ldc-doux/database/factories/SliderFactory.php
2026-10-27 09:12:51 +01:00

35 lines
703 B
PHP

<?php
namespace Database\Factories;
use App\Models\Slider;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
class SliderFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
#[\Override]
protected $model = Slider::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
$label = $this->faker->unique()->word();
return [
'label' => $label,
'slug' => Str::slug($label),
'commentaire' => $this->faker->realText(50),
'published' => true
];
}
}