!9 权限优化

Merge pull request !9 from feature
This commit is contained in:
赵世界 2022-08-17 03:23:16 +00:00 committed by Gitee
commit 1a44027349
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

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);
} }
} }