Changeset View
Changeset View
Standalone View
Standalone View
src/database/seeds/production/SkuSeeder.php
Show First 20 Lines • Show All 146 Lines • ▼ Show 20 Lines | public function run() | ||||
'cost' => 100, | 'cost' => 100, | ||||
'units_free' => 0, | 'units_free' => 0, | ||||
'period' => 'monthly', | 'period' => 'monthly', | ||||
'handler_class' => 'App\Handlers\Activesync', | 'handler_class' => 'App\Handlers\Activesync', | ||||
'active' => true, | 'active' => true, | ||||
] | ] | ||||
); | ); | ||||
// Check existence because migration might have added this already | |||||
if (!\App\Sku::where('title', 'beta')->first()) { | |||||
Sku::create( | Sku::create( | ||||
[ | [ | ||||
'title' => 'beta', | 'title' => 'beta', | ||||
'name' => 'Beta program', | 'name' => 'Beta program', | ||||
'description' => 'Access to beta program subscriptions', | 'description' => 'Access to beta program subscriptions', | ||||
'cost' => 0, | 'cost' => 0, | ||||
'units_free' => 0, | 'units_free' => 0, | ||||
'period' => 'monthly', | 'period' => 'monthly', | ||||
'handler_class' => 'App\Handlers\Beta', | 'handler_class' => 'App\Handlers\Beta', | ||||
'active' => false, | 'active' => false, | ||||
] | ] | ||||
); | ); | ||||
} | |||||
// Check existence because migration might have added this already | |||||
if (!\App\Sku::where('title', 'meet')->first()) { | |||||
Sku::create( | Sku::create( | ||||
[ | [ | ||||
'title' => 'meet', | 'title' => 'meet', | ||||
'name' => 'Video chat', | 'name' => 'Video chat', | ||||
'description' => 'Video conferencing tool', | 'description' => 'Video conferencing tool', | ||||
'cost' => 0, | 'cost' => 0, | ||||
'units_free' => 0, | 'units_free' => 0, | ||||
'period' => 'monthly', | 'period' => 'monthly', | ||||
'handler_class' => 'App\Handlers\Beta\Meet', | 'handler_class' => 'App\Handlers\Beta\Meet', | ||||
'active' => true, | 'active' => true, | ||||
] | ] | ||||
); | ); | ||||
} | } | ||||
} | } | ||||
} |