diff --git a/database/seeders/PermissionsSeeder.php b/database/seeders/PermissionsSeeder.php new file mode 100644 index 00000000..213b7e45 --- /dev/null +++ b/database/seeders/PermissionsSeeder.php @@ -0,0 +1,17 @@ + 'admin']); + $permissions = Permission::where('guard_name', 'web')->pluck('id')->toArray(); + $adminRole->syncPermissions($permissions); + + $freeRole = Role::firstOrCreate(['name' => 'free']); + $freePermissions = Permission::where('guard_name', 'web')->pluck('id')->toArray(); + $freeRole->syncPermissions($freePermissions); + } +}