Changeset View
Changeset View
Standalone View
Standalone View
src/database/seeds/local/DomainSeeder.php
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | public function run() | ||||
Domain::create( | Domain::create( | ||||
[ | [ | ||||
'namespace' => $domain, | 'namespace' => $domain, | ||||
'status' => Domain::STATUS_CONFIRMED + Domain::STATUS_ACTIVE, | 'status' => Domain::STATUS_CONFIRMED + Domain::STATUS_ACTIVE, | ||||
'type' => Domain::TYPE_EXTERNAL | 'type' => Domain::TYPE_EXTERNAL | ||||
] | ] | ||||
); | ); | ||||
} | } | ||||
// example tenant domain, note that 'tenant_id' is not a fillable. | |||||
$domain = Domain::create( | |||||
[ | |||||
'namespace' => 'example-tenant.dev-local', | |||||
'status' => Domain::STATUS_CONFIRMED + Domain::STATUS_ACTIVE, | |||||
'type' => Domain::TYPE_PUBLIC | |||||
] | |||||
); | |||||
$tenant = \App\Tenant::where('title', 'Sample Tenant')->first(); | |||||
$domain->tenant_id = $tenant->id; | |||||
$domain->save(); | |||||
} | } | ||||
} | } |