@@ -21,9 +21,15 @@ class BaseDatabaseSeeder extends Seeder
|
||||
],
|
||||
);
|
||||
|
||||
// The organization is created by the model's created hook, which is
|
||||
// silenced while run under a parent seeder using WithoutModelEvents,
|
||||
// so create one here when needed.
|
||||
if ($admin->currentOrganization()->first() === null) {
|
||||
$admin->createPersonalOrganization();
|
||||
}
|
||||
|
||||
// Grandfather the admin so a fresh install is usable before any Stripe
|
||||
// price is configured. The organization itself is created by the
|
||||
// model's created hook.
|
||||
// price is configured.
|
||||
$admin->currentOrganization()->first()?->forceFill([
|
||||
'lifetime_access' => true,
|
||||
])->save();
|
||||
|
||||
Reference in New Issue
Block a user