36 lines
920 B
PHP
36 lines
920 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Advice;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
use SplFileInfo;
|
|
|
|
class AdviceFactory extends Factory
|
|
{
|
|
|
|
/**
|
|
* The name of the factory's corresponding model.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $model = Advice::class;
|
|
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function definition()
|
|
{
|
|
return [
|
|
'title1' => $this->faker->text(20),
|
|
'title2' => $this->faker->text(20),
|
|
'picture1' => new SplFileInfo(resource_path('assets/images/repas.jpg')),
|
|
'picture2' => new SplFileInfo(resource_path('assets/images/repas.jpg')),
|
|
'picture3' => new SplFileInfo(resource_path('assets/images/repas.jpg')),
|
|
'text1' => $this->faker->paragraph(10),
|
|
'text2' => $this->faker->paragraph(10),
|
|
];
|
|
}
|
|
}
|