ldc-legaulois/database/factories/RangeFactory.php

39 lines
1.2 KiB
PHP
Raw Permalink Normal View History

2024-04-12 13:41:57 +00:00
<?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
2024-04-12 13:41:57 +00:00
{
$label = fake()->unique()->words(rand(1, 2), true);
2026-09-25 16:25:31 +02:00
2024-04-12 13:41:57 +00:00
return [
'label' => $label,
'subtitle' => fake()->text(10),
2024-04-12 13:41:57 +00:00
'slug' => Str::slug($label),
'description' => fake()->sentence(),
'banner' => '',
2024-04-12 13:41:57 +00:00
'banner_alt' => fake()->sentence(),
'banner_title' => fake()->sentence(),
'banner_ambiance' => '',
2024-04-12 13:41:57 +00:00
'banner_ambiance_alt' => fake()->sentence(),
'banner_ambiance_title' => fake()->sentence(),
'picture' => '',
'picture_alt' => fake()->sentence(),
'picture_title' => fake()->sentence(),
2024-04-12 13:41:57 +00:00
'color' => fake()->unique()->safeHexColor(),
'order' => 1,
2024-04-12 13:41:57 +00:00
'published' => fake()->boolean(75),
];
}
}