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;
|
||||
@@ -14,7 +16,7 @@ class RecipeAuthor extends Seeder
|
||||
public function run(): void
|
||||
{
|
||||
if (User::count() > 0 && Recipe::count() > 0) {
|
||||
Recipe::each(function ($recipe) {
|
||||
Recipe::each(static function ($recipe): void {
|
||||
User::inRandomOrder()
|
||||
->first()
|
||||
->author_of_recipe()
|
||||
|
||||
Reference in New Issue
Block a user