ldc-doux/database/factories/EncartFactory.php
2021-12-08 17:32:56 +01:00

32 lines
815 B
PHP

<?php
namespace Database\Factories;
use App\Models\Encart;
use Illuminate\Database\Eloquent\Factories\Factory;
class EncartFactory extends Factory
{
protected $model = Encart::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'title' => $this->faker->words(5),
'title' => $this->faker->words(5),
'text' => $this->faker->realText(25),
'link_label' => $this->faker->text(128),
'link' => route('wasup'),
'link_new_tab' => rand(0, 1),
'date_start' => Carbon::now(),
'date_end' => Carbon::now()->addDays(2),
'picture' => new SplFileInfo(resource_path('assets/images/image-sample.jpg'))
];
}
}