diff --git a/packages/slimkit-plus-checkin/database/seeds/AbilitySeeder.php b/packages/slimkit-plus-checkin/database/seeds/AbilitySeeder.php index 9e3e3c9cb..2c479eea0 100644 --- a/packages/slimkit-plus-checkin/database/seeds/AbilitySeeder.php +++ b/packages/slimkit-plus-checkin/database/seeds/AbilitySeeder.php @@ -41,6 +41,8 @@ public function run() ]); $roles = Role::whereIn('name', ['founder'])->get(); - $roles->each->abilities()->syncWithoutDetaching([$ability]); + $roles->each(function (Role $role) use ($ability) { + $role->abilities()->syncWithoutDetaching($ability); + }); } } diff --git a/packages/slimkit-plus-feed/database/seeds/AbilityTableSeeder.php b/packages/slimkit-plus-feed/database/seeds/AbilityTableSeeder.php index 6dd5386d8..ad06a9767 100755 --- a/packages/slimkit-plus-feed/database/seeds/AbilityTableSeeder.php +++ b/packages/slimkit-plus-feed/database/seeds/AbilityTableSeeder.php @@ -41,6 +41,8 @@ public function run() $ability->save(); $roles = Role::whereIn('name', ['founder', 'owner'])->get(); - $roles->each->abilities()->syncWithoutDetaching([$ability]); + $roles->each(function (Role $role) use ($ability) { + $role->abilities()->syncWithoutDetaching($ability); + }); } }