44 lines
1.1 KiB
PHP
44 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Home;
|
|
use App\Models\Product;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends Factory<\App\Models\Home>
|
|
*/
|
|
final class HomeFactory extends Factory
|
|
{
|
|
/**
|
|
* The name of the factory's corresponding model.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $model = Home::class;
|
|
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'seo_title' => fake()->word,
|
|
'seo_description' => fake()->text,
|
|
'part1_title' => fake()->word,
|
|
'part1_title_span' => fake()->word,
|
|
'part1_text_1' => fake()->text,
|
|
'part1_text_2' => fake()->text,
|
|
'part1_text_3' => fake()->text,
|
|
'part2_title' => fake()->word,
|
|
'part2_title_span' => fake()->word,
|
|
'part2_text' => fake()->text,
|
|
'part2_list' => fake()->text,
|
|
'part2_product1_id' => fake()->randomElement(Product::pluck('id')),
|
|
'part2_product2_id' => fake()->randomElement(Product::pluck('id')),
|
|
];
|
|
}
|
|
}
|