refactor(modular): 完成第二階段儀表板解耦與模型清理
This commit is contained in:
@@ -39,4 +39,17 @@ class CoreService implements CoreServiceInterface
|
||||
{
|
||||
return User::all();
|
||||
}
|
||||
|
||||
public function ensureSystemUserExists()
|
||||
{
|
||||
$user = User::first();
|
||||
if (!$user) {
|
||||
$user = User::create([
|
||||
'name' => '系統管理員',
|
||||
'email' => 'admin@example.com',
|
||||
'password' => bcrypt('password'),
|
||||
]);
|
||||
}
|
||||
return $user;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user