36 lines
1.3 KiB
PHP
36 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Enums\Settings\MenuNodeType;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
class MenuNodeDataFactory extends Factory
|
|
{
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'type' => \collect(MenuNodeType::toArray())->random()->value,
|
|
'sub_label' => fake()->sentence(),
|
|
'title' => fake()->sentence(),
|
|
'text' => fake()->sentence(),
|
|
'text_color' => fake()->unique()->safeHexColor(),
|
|
'link_url' => fake()->url(),
|
|
'link_title' => fake()->sentence(),
|
|
'link_target' => fake()->boolean(),
|
|
'link_status' => fake()->boolean(),
|
|
'picture' => '',
|
|
'picture_alt' => fake()->sentence(),
|
|
'picture_title' => fake()->sentence(),
|
|
'picture_status' => fake()->boolean(),
|
|
'background_picture' => '',
|
|
'background_picture_alt' => fake()->sentence(),
|
|
'background_picture_title' => fake()->sentence(),
|
|
];
|
|
}
|
|
}
|