'system'], ['name' => 'System', 'active' => true] ); $admin = \App\Models\User::withoutGlobalScopes()->firstOrCreate( ['email' => 'admin@lernschiff.com'], [ 'name' => 'Platform Admin', 'tenant_id' => $system->id, 'password' => Hash::make('password'), ] ); $role = Role::where('name', 'platform-admin')->first(); DB::table('role_user')->updateOrInsert( ['user_id' => $admin->id], ['role_id' => $role->id, 'created_at' => now(), 'updated_at' => now()] ); } }