forked from eatvio/eatvio-infra
recipe seeder and factories fix code style
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Recipe;
|
||||
@@ -17,7 +19,7 @@ class RecipeCommentSeeder extends Seeder
|
||||
if (User::count() > 0 && Recipe::count() > 0) {
|
||||
$comments = RecipeComment::factory()->count(5)->make();
|
||||
|
||||
$comments->each(function ($comment) {
|
||||
$comments->each(static function ($comment): void {
|
||||
$comment->author()->associate(
|
||||
User::inRandomOrder()
|
||||
->first()
|
||||
|
||||
Reference in New Issue
Block a user