- Update API: events, users, policies, routes, resources, migrations - Remove deprecated models/resources (customers, setlists, invitations, etc.) - Refresh admin app and docs; remove apps/band Made-with: Cursor
36 lines
827 B
PHP
36 lines
827 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Models\Organisation;
|
|
use App\Models\User;
|
|
use Illuminate\Database\Seeder;
|
|
use Illuminate\Support\Facades\Hash;
|
|
|
|
class DatabaseSeeder extends Seeder
|
|
{
|
|
public function run(): void
|
|
{
|
|
$this->call(RoleSeeder::class);
|
|
|
|
$admin = User::create([
|
|
'name' => 'Super Admin',
|
|
'email' => 'admin@eventcrew.nl',
|
|
'password' => Hash::make('password'),
|
|
]);
|
|
|
|
$admin->assignRole('super_admin');
|
|
|
|
$organisation = Organisation::query()->create([
|
|
'name' => 'Demo Organisation',
|
|
'slug' => 'demo',
|
|
'billing_status' => 'active',
|
|
'settings' => [],
|
|
]);
|
|
|
|
$admin->organisations()->attach($organisation->id, ['role' => 'org_admin']);
|
|
}
|
|
}
|