37 lines
1.2 KiB
PHP
37 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
use Illuminate\Support\Str;
|
|
|
|
class RangeFactory extends Factory
|
|
{
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
$label = fake()->unique()->words(rand(1, 2), true);
|
|
return [
|
|
'label' => $label,
|
|
'subtitle' => fake()->text(10),
|
|
'slug' => Str::slug($label),
|
|
'description' => fake()->sentence(),
|
|
'banner' => '',
|
|
'banner_alt' => fake()->sentence(),
|
|
'banner_title' => fake()->sentence(),
|
|
'banner_ambiance' => '',
|
|
'banner_ambiance_alt' => fake()->sentence(),
|
|
'banner_ambiance_title' => fake()->sentence(),
|
|
'picture' => '',
|
|
'picture_alt' => fake()->sentence(),
|
|
'picture_title' => fake()->sentence(),
|
|
'color' => fake()->unique()->safeHexColor(),
|
|
'order' => 1,
|
|
'published' => fake()->boolean(75),
|
|
];
|
|
}
|
|
}
|