35 lines
747 B
PHP
35 lines
747 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\HeroSlide;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends Factory<HeroSlide>
|
|
*/
|
|
class HeroSlideFactory extends Factory
|
|
{
|
|
/**
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'label' => fake()->words(3, true),
|
|
'title' => fake()->sentence(5),
|
|
'description' => fake()->paragraph(),
|
|
'image' => null,
|
|
'order_index' => fake()->numberBetween(0, 10),
|
|
'is_active' => true,
|
|
];
|
|
}
|
|
|
|
public function inactive(): static
|
|
{
|
|
return $this->state(fn (array $attributes) => [
|
|
'is_active' => false,
|
|
]);
|
|
}
|
|
}
|