- 新增使用者「啟用/停用」狀態切換功能 (含後端 API、權限控管、活動紀錄) - 強化安全性:隱藏超級管理員角色的可見度與操作權限 - 更新開發規範:加入多租戶資料同步規範於 framework.md - 前端優化:使用 Switch 元件進行狀態快速切換,調整表格欄位順序
35 lines
697 B
PHP
35 lines
697 B
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Modules\Core\Models\User;
|
|
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
|
use Illuminate\Database\Seeder;
|
|
|
|
class DatabaseSeeder extends Seeder
|
|
{
|
|
use WithoutModelEvents;
|
|
|
|
/**
|
|
* Seed the application's database.
|
|
*/
|
|
public function run(): void
|
|
{
|
|
// User::factory(10)->create();
|
|
|
|
User::firstOrCreate(
|
|
['username' => 'admin'],
|
|
[
|
|
'name' => '系統管理員',
|
|
'email' => 'admin@example.com',
|
|
'password' => 'password',
|
|
'is_active' => true,
|
|
]
|
|
);
|
|
|
|
$this->call(PermissionSeeder::class);
|
|
|
|
|
|
}
|
|
}
|