feat: #20220816 权限优化

This commit is contained in:
赵世界 2022-08-17 11:20:52 +08:00
parent 1c89064f65
commit 403c9f96b7

View File

@ -15,7 +15,7 @@ class PermissionsTableSeeder extends Seeder
{ {
$routes = include(resource_path('lang/zh-CN/permission.php')); $routes = include(resource_path('lang/zh-CN/permission.php'));
foreach ($routes as $key => $route) { foreach ($routes as $key => $route) {
$data = ['name' => $key, 'guard_name' => 'api']; $data = ['id' => $route['id'], 'name' => $key, 'guard_name' => 'api'];
Permission::firstOrCreate($data); Permission::firstOrCreate($data);
} }
} }