28 lines
750 B
PHP
28 lines
750 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
use Illuminate\Support\Carbon;
|
|
use SplFileInfo;
|
|
|
|
class PostFactory extends Factory
|
|
{
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function definition()
|
|
{
|
|
return [
|
|
'title' => $this->faker->text(5),
|
|
'text' => $this->faker->paragraph(10, false),
|
|
'picture_home' => new SplFileInfo(resource_path('assets/images/burger-fond.jpg')),
|
|
'picture_news' => new SplFileInfo(resource_path('assets/images/burger.jpg')),
|
|
'date_start' => Carbon::now(),
|
|
'date_end' => Carbon::now()->addDays(2),
|
|
'on_top' => false
|
|
];
|
|
}
|
|
}
|