recipe seeder and factories fix code style

This commit is contained in:
2023-12-21 15:01:03 +03:00
parent abd3b72e2e
commit 4e02272d2c
6 changed files with 18 additions and 14 deletions

View File

@@ -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()