[FEAT] 更新 Admin 密碼與新增機台照片更新功能
All checks were successful
star-cloud-deploy-demo / deploy-demo (push) Successful in 40s

This commit is contained in:
2026-03-18 17:43:40 +08:00
parent 2afcdcebc5
commit 64ac398270
9 changed files with 350 additions and 82 deletions

View File

@@ -20,13 +20,13 @@ class AdminUserSeeder extends Seeder
{
// 檢查是否已存在 admin 帳號,避免重複建立
$admin = User::where('username', 'admin')->first();
if ($admin) {
$this->command->info('Admin 帳號已存在,執行更新密碼與資料。');
$admin->update([
'name' => 'Admin',
'email' => 'admin@star-cloud.com',
'password' => Hash::make('password'),
'password' => Hash::make('Star82779061'),
]);
$admin->assignRole('super-admin');
return;
@@ -43,4 +43,4 @@ class AdminUserSeeder extends Seeder
$this->command->info('Admin 帳號建立成功!');
}
}
}