ldc-doux/database/factories/SliderFactory.php

35 lines
686 B
PHP
Raw Normal View History

2021-12-07 23:35:14 +01:00
<?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),
2021-12-13 16:55:12 +01:00
'commentaire' => $this->faker->realText(50),
2021-12-22 17:32:05 +01:00
'published' => true
2021-12-07 23:35:14 +01:00
];
}
}