forked from eatvio/eatvio-infra
update plan create test
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use FakerRestaurant\Provider\en_US\Restaurant;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
@@ -34,10 +36,12 @@ class PlanFactory extends Factory
|
||||
'description' => $this->faker->text(),
|
||||
];
|
||||
|
||||
Storage::fake('plans');
|
||||
|
||||
return [
|
||||
'name' => $this->faker->foodName(),
|
||||
// 'image' => $this->faker->image('application/storage/fake_images', 640, 480, null, false),
|
||||
'image' => storage_path('public/img/Photo_C.png'),
|
||||
// 'image' => UploadedFile::fake()->image('plans/Photo_C.png'),
|
||||
'image' => UploadedFile::fake()->image('plan.png'),
|
||||
'duration' => $this->faker->randomElement([7, 14,21]),
|
||||
'state' => $this->faker->randomElement(['active', 'draft', 'archived']),
|
||||
'type' => $typeBody,
|
||||
|
||||
Reference in New Issue
Block a user