Changeset View
Changeset View
Standalone View
Standalone View
src/database/seeds/local/SkuSeeder.php
Show First 20 Lines • Show All 200 Lines • ▼ Show 20 Lines | public function run() | ||||
'units_free' => 0, | 'units_free' => 0, | ||||
'period' => 'monthly', | 'period' => 'monthly', | ||||
'handler_class' => 'App\Handlers\Group', | 'handler_class' => 'App\Handlers\Group', | ||||
'active' => true, | 'active' => true, | ||||
] | ] | ||||
); | ); | ||||
} | } | ||||
$sku = Sku::where(['title' => 'room', 'tenant_id' => \config('app.tenant_id')])->first(); | |||||
if (!$sku) { | |||||
Sku::create([ | |||||
'title' => 'room', | |||||
'name' => 'Conference room', | |||||
'description' => 'Audio & Video Conference room', | |||||
'cost' => 0, | |||||
'units_free' => 0, | |||||
'period' => 'monthly', | |||||
'handler_class' => 'App\Handlers\Room', | |||||
'active' => true, | |||||
]); | |||||
} | |||||
// Check existence because migration might have added this already | // Check existence because migration might have added this already | ||||
$sku = Sku::where(['title' => 'beta-distlists', 'tenant_id' => \config('app.tenant_id')])->first(); | $sku = Sku::where(['title' => 'beta-distlists', 'tenant_id' => \config('app.tenant_id')])->first(); | ||||
if (!$sku) { | if (!$sku) { | ||||
Sku::create( | Sku::create( | ||||
[ | [ | ||||
'title' => 'beta-distlists', | 'title' => 'beta-distlists', | ||||
'name' => 'Distribution lists', | 'name' => 'Distribution lists', | ||||
▲ Show 20 Lines • Show All 164 Lines • Show Last 20 Lines |