30 lines
649 B
PHP
30 lines
649 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Menu;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends Factory<Menu>
|
|
*/
|
|
class MenuFactory extends Factory
|
|
{
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'name' => fake()->words(2, true),
|
|
'url' => fake()->url(),
|
|
'new_tab' => fake()->boolean(),
|
|
'parent' => fake()->optional()->randomElement(['home', 'about', 'contact']),
|
|
'created_at' => now(),
|
|
'updated_at' => now(),
|
|
];
|
|
}
|
|
}
|