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

34 lines
686 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
*/
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
];
}
}