forked from eatvio/eatvio-infra
fix reipe fields cooking_time, steps factory
This commit is contained in:
@@ -1,14 +1,12 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Faker\Provider\Youtube;
|
||||
use FakerRestaurant\Provider\en_US\Restaurant;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Illuminate\Http\File;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
/**
|
||||
@@ -31,7 +29,7 @@ class RecipeFactory extends Factory
|
||||
'title' => $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),
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user