Changeset View
Changeset View
Standalone View
Standalone View
src/database/seeds/production/SkuSeeder.php
Show First 20 Lines • Show All 110 Lines • ▼ Show 20 Lines | public function run() | ||||
'period' => 'monthly', | 'period' => 'monthly', | ||||
'handler_class' => 'App\Handlers\Resource', | 'handler_class' => 'App\Handlers\Resource', | ||||
'active' => true, | 'active' => true, | ||||
] | ] | ||||
); | ); | ||||
Sku::create( | Sku::create( | ||||
[ | [ | ||||
'title' => 'shared_folder', | 'title' => 'shared-folder', | ||||
'name' => 'Shared Folder', | 'name' => 'Shared Folder', | ||||
'description' => 'A shared folder', | 'description' => 'A shared folder', | ||||
'cost' => 89, | 'cost' => 89, | ||||
'period' => 'monthly', | 'period' => 'monthly', | ||||
'handler_class' => 'App\Handlers\SharedFolder', | 'handler_class' => 'App\Handlers\SharedFolder', | ||||
'active' => false, | 'active' => false, | ||||
] | ] | ||||
); | ); | ||||
▲ Show 20 Lines • Show All 94 Lines • ▼ Show 20 Lines | public function run() | ||||
'description' => 'Access to calendaring resources', | 'description' => 'Access to calendaring resources', | ||||
'cost' => 0, | 'cost' => 0, | ||||
'units_free' => 0, | 'units_free' => 0, | ||||
'period' => 'monthly', | 'period' => 'monthly', | ||||
'handler_class' => 'App\Handlers\Beta\Resources', | 'handler_class' => 'App\Handlers\Beta\Resources', | ||||
'active' => true, | 'active' => true, | ||||
]); | ]); | ||||
} | } | ||||
// Check existence because migration might have added this already | |||||
if (!Sku::where('title', 'beta-shared-folders')->first()) { | |||||
Sku::create([ | |||||
'title' => 'beta-shared-folders', | |||||
'name' => 'Shared folders', | |||||
'description' => 'Access to shared folders', | |||||
'cost' => 0, | |||||
'units_free' => 0, | |||||
'period' => 'monthly', | |||||
'handler_class' => 'App\Handlers\Beta\SharedFolders', | |||||
'active' => true, | |||||
]); | |||||
} | |||||
} | } | ||||
} | } |