ldc-doux/database/factories/GammeFactory.php
2021-12-21 17:30:39 +01:00

32 lines
875 B
PHP

<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use SplFileInfo;
use Illuminate\Support\Str;
class GammeFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
$title = $this->faker->word();
return [
'parent_gamme_id' => null,
'title' => $title,
'slug' => Str::slug($title),
'text' => $this->faker->text(5),
'color' => $this->faker->hexColor(),
'picture' => new SplFileInfo(resource_path('assets/images/cookrange.jpg')),
'alt_text_picture' => $this->faker->sentence(10),
'banner' => new SplFileInfo(resource_path('assets/images/cat_bckg.jpg')),
'alt_text_banner' => $this->faker->sentence(10),
];
}
}