Files
crewli/api/database/seeders/DatabaseSeeder.php
bert.hausmans fda161ee09 chore: align migrations, docs, and frontends with crewli.app setup
- Replace dated migrations with ordered 2026_04_07_* chain; fold users update into base migration
- Update OrganisationScope, AppServiceProvider, seeders, api routes, and .env.example
- Refresh Cursor rules, CLAUDE.md, Makefile, README, and docs (API, SCHEMA, SETUP)
- Adjust admin/app/portal HTML, packages, api-client, events types, and theme config
- Update docker-compose and VS Code settings; remove stray Office lock files from resources

Made-with: Cursor
2026-04-07 10:45:34 +02:00

36 lines
825 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@crewli.app',
'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']);
}
}