From fc33b6cd8fcf3ad0e67b83199e76eff2d08321c6 Mon Sep 17 00:00:00 2001 From: alex-chevski Date: Wed, 27 Dec 2023 10:44:22 +0300 Subject: [PATCH] fix reipe fields cooking_time, steps factory --- database/factories/RecipeFactory.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/database/factories/RecipeFactory.php b/database/factories/RecipeFactory.php index e73976a..2af1fac 100644 --- a/database/factories/RecipeFactory.php +++ b/database/factories/RecipeFactory.php @@ -1,14 +1,12 @@ - $this->faker->foodName(), 'image' => $this->generateImageFile('recipes'), 'state' => $this->faker->randomElement(['active', 'archived']), - 'cooking_time' => $this->faker->numberBetween(0, 59), + 'cooking_time' => $this->faker->randomElement(['10', '20', '30', '60', '120', '14400']), 'ingredients' => $this->createQuentityIngredients($this->faker->randomDigitNotNull()), // quentity - от 1 до 10 randomDigitNotNull 'type' => $this->faker->randomElement(['first_meals', 'second_meals', 'salads', 'snacks', 'drinks', 'other']), 'description' => $this->faker->text(), @@ -56,7 +54,7 @@ class RecipeFactory extends Factory { return [ 'name' => $this->faker->foodName(), - 'unit' => $this->faker->randomElement(['гр', 'ч. ложек', 'cт. ложек', 'мл', 'шт', 'зубчик', 'по вкусу']), + 'unit' => $this->faker->randomElement(['gr', 'teespons', 'tablespoon', 'ml', 'pcs', 'clove', 'to_taste']), 'portion' => $this->faker->randomNumber(3, true), ]; }