Changeset View
Changeset View
Standalone View
Standalone View
src/database/seeds/local/SkuSeeder.php
Show First 20 Lines • Show All 117 Lines • ▼ Show 20 Lines | public function run() | ||||
'units_free' => 0, | 'units_free' => 0, | ||||
'period' => 'monthly', | 'period' => 'monthly', | ||||
'handler_class' => 'App\Handlers\Activesync', | 'handler_class' => 'App\Handlers\Activesync', | ||||
'active' => true, | 'active' => true, | ||||
], | ], | ||||
[ | [ | ||||
'title' => 'beta', | 'title' => 'beta', | ||||
'name' => 'Private Beta (invitation only)', | 'name' => 'Private Beta (invitation only)', | ||||
'description' => 'Access to the private beta program subscriptions', | 'description' => 'Access to the private beta program features', | ||||
'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, | ||||
], | ], | ||||
[ | [ | ||||
'title' => 'group', | 'title' => 'group', | ||||
Show All 10 Lines | public function run() | ||||
'name' => 'Conference room', | 'name' => 'Conference room', | ||||
'description' => 'Audio & Video Conference room', | 'description' => 'Audio & Video Conference room', | ||||
'cost' => 0, | 'cost' => 0, | ||||
'units_free' => 0, | 'units_free' => 0, | ||||
'period' => 'monthly', | 'period' => 'monthly', | ||||
'handler_class' => 'App\Handlers\Room', | 'handler_class' => 'App\Handlers\Room', | ||||
'active' => true, | 'active' => true, | ||||
], | ], | ||||
[ | |||||
'title' => 'beta-distlists', | |||||
'name' => 'Distribution lists', | |||||
'description' => 'Access to mail distribution lists', | |||||
'cost' => 0, | |||||
'units_free' => 0, | |||||
'period' => 'monthly', | |||||
'handler_class' => 'App\Handlers\Beta\Distlists', | |||||
'active' => true, | |||||
], | |||||
[ | |||||
'title' => 'beta-resources', | |||||
'name' => 'Calendaring resources', | |||||
'description' => 'Access to calendaring resources', | |||||
'cost' => 0, | |||||
'units_free' => 0, | |||||
'period' => 'monthly', | |||||
'handler_class' => 'App\Handlers\Beta\Resources', | |||||
'active' => true, | |||||
], | |||||
[ | |||||
'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, | |||||
], | |||||
[ | |||||
'title' => 'files', | |||||
'name' => 'File storage', | |||||
'description' => 'Access to file storage', | |||||
'cost' => 0, | |||||
'units_free' => 0, | |||||
'period' => 'monthly', | |||||
'handler_class' => 'App\Handlers\Files', | |||||
'active' => true, | |||||
], | |||||
]; | ]; | ||||
foreach ($skus as $sku) { | foreach ($skus as $sku) { | ||||
// Check existence because migration might have added this already | // Check existence because migration might have added this already | ||||
if (!Sku::where('title', $sku['title'])->where('tenant_id', \config('app.tenant_id'))->first()) { | if (!Sku::where('title', $sku['title'])->where('tenant_id', \config('app.tenant_id'))->first()) { | ||||
Sku::create($sku); | Sku::create($sku); | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 80 Lines • Show Last 20 Lines |