From f3e81bd619b2d845df319ee90d606a874817b154 Mon Sep 17 00:00:00 2001 From: Curtis Delicata Date: Sat, 20 Jul 2024 18:13:59 +0000 Subject: [PATCH] Upgrade composer and npm --- database/seeders/PermissionsSeeder.php | 17 +++++++++++++++++ database/seeders/RolesSeeder.php | 24 ++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 database/seeders/PermissionsSeeder.php create mode 100644 database/seeders/RolesSeeder.php 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); + } +}