ldc-doux/database/factories/MomentFactory.php
2022-07-27 14:53:32 +02:00

33 lines
777 B
PHP

<?php
namespace Database\Factories;
use App\Models\Moment;
use Illuminate\Database\Eloquent\Factories\Factory;
use SplFileInfo;
class MomentFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Moment::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'title' => $this->faker->text(5),
'subtitle' => $this->faker->sentence(7, false),
'text' => $this->faker->paragraph(10, false),
'picture' => new SplFileInfo(resource_path('assets/images/prez-img.jpg')),
'alt_text_picture' => $this->faker->sentence(10),
];
}
}