46 lines
1.1 KiB
PHP
46 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Page>
|
|
*/
|
|
class PageFactory extends Factory
|
|
{
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'slug' => fake()->unique()->slug(2),
|
|
'title_ar' => fake()->sentence(3),
|
|
'title_en' => fake()->sentence(3),
|
|
'content_ar' => '<p>'.fake()->paragraphs(3, true).'</p>',
|
|
'content_en' => '<p>'.fake()->paragraphs(3, true).'</p>',
|
|
];
|
|
}
|
|
|
|
public function terms(): static
|
|
{
|
|
return $this->state(fn (array $attributes) => [
|
|
'slug' => 'terms',
|
|
'title_ar' => 'شروط الخدمة',
|
|
'title_en' => 'Terms of Service',
|
|
]);
|
|
}
|
|
|
|
public function privacy(): static
|
|
{
|
|
return $this->state(fn (array $attributes) => [
|
|
'slug' => 'privacy',
|
|
'title_ar' => 'سياسة الخصوصية',
|
|
'title_en' => 'Privacy Policy',
|
|
]);
|
|
}
|
|
}
|