Skip to content

Commit

Permalink
fixed UserSeeder
Browse files Browse the repository at this point in the history
  • Loading branch information
Marko259 committed Aug 2, 2024
1 parent d592e92 commit 13024c5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions database/seeders/UserSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public function run(): void
// Assign groups randomly, or specific group for user 10
if ($i !== 11) {
$randomGroup = $groups->random(rand(0, $groups->count()))->pluck('id')->toArray();
$user->groups()->attach($randomGroup);
}
}
}
Expand Down

0 comments on commit 13024c5

Please sign in to comment.