Files
crewli/api/database/seeders/DatabaseSeeder.php
bert.hausmans c417a6647a feat(app): auth, orgs/events UI, router guards, and dev tooling
- Add Sanctum auth flow (store, composables, login, axios interceptors)
- Add dashboard, organisation list/detail, events CRUD dialogs
- Wire router guards, navigation, organisation switcher in layout
- Replace Vuexy @db types in NavSearchBar; add @iconify/types; themeConfig title typing
- Vuetify settings.scss + resolve configFile via fileURLToPath; drop dead path aliases
- Root index redirects to dashboard; fix events table route name
- API: DevSeeder + DatabaseSeeder updates; docs TEST_SCENARIO; corporate identity assets

Made-with: Cursor
2026-04-07 21:51:10 +02:00

40 lines
922 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']);
if (app()->environment('local')) {
$this->call(DevSeeder::class);
}
}
}