Fixed undefined variable

This commit is contained in:
2023-09-11 09:10:35 +01:00
parent 963c642b30
commit 2996d4cd33

View File

@@ -92,7 +92,7 @@ class EnableAuditer extends BaseSeed
*/ */
protected function saveRoles(array &$roles) protected function saveRoles(array &$roles)
{ {
foreach ($roles as $role) { foreach ($roles as $slug => $role) {
// Trying to find if the role already exist // Trying to find if the role already exist
$existingRole = Role::where(['slug' => $role->slug])->first(); $existingRole = Role::where(['slug' => $role->slug])->first();