[FEAT] 優化部署流程:加入 RoleSeeder 與 AdminUserSeeder,並實作權限系統基礎架構與多租戶隔離機制
All checks were successful
star-cloud-deploy-demo / deploy-demo (push) Successful in 48s

This commit is contained in:
2026-03-13 17:35:22 +08:00
parent 39d25ed1d4
commit 56daf8940b
41 changed files with 3052 additions and 358 deletions

View File

@@ -27,19 +27,20 @@ class AdminUserSeeder extends Seeder
'name' => 'Admin',
'email' => 'admin@star-cloud.com',
'password' => Hash::make('password'),
'role' => 'admin',
]);
$admin->assignRole('super-admin');
return;
}
User::create([
$admin = User::create([
'username' => 'admin',
'name' => 'Admin',
'email' => 'admin@star-cloud.com',
'password' => Hash::make('password'),
'role' => 'admin',
]);
$admin->assignRole('super-admin');
$this->command->info('Admin 帳號建立成功!');
}
}