ldc-doux/database/factories/MomentFactory.php
2021-12-20 14:02:37 +01:00

34 lines
778 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),
];
}
}