complet story 6.9 with qa tests

This commit is contained in:
Naser Mansour
2025-12-28 22:51:17 +02:00
parent 102f8553f4
commit 50542e1eb0
17 changed files with 1157 additions and 41 deletions
+45
View File
@@ -0,0 +1,45 @@
<?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',
]);
}
}