1.7 KiB
1.7 KiB
Story 6.9: Legal Pages Editor
Epic Reference
Epic 6: Admin Dashboard
User Story
As an admin, I want to edit Terms of Service and Privacy Policy pages, So that I can maintain legal compliance and update policies.
Acceptance Criteria
Pages to Edit
- Terms of Service
- Privacy Policy
Editor Features
- Rich text editor
- Bilingual content (Arabic/English)
- Save and publish
- Preview before publishing
Public Display
- Pages accessible from footer (public)
- Last updated timestamp displayed
Technical Notes
Store in database settings table or dedicated pages table.
// Migration
Schema::create('pages', function (Blueprint $table) {
$table->id();
$table->string('slug')->unique();
$table->string('title_ar');
$table->string('title_en');
$table->text('content_ar');
$table->text('content_en');
$table->timestamps();
});
// Seeder
Page::create([
'slug' => 'terms',
'title_ar' => 'شروط الخدمة',
'title_en' => 'Terms of Service',
'content_ar' => '',
'content_en' => '',
]);
Page::create([
'slug' => 'privacy',
'title_ar' => 'سياسة الخصوصية',
'title_en' => 'Privacy Policy',
'content_ar' => '',
'content_en' => '',
]);
Public Route
Route::get('/page/{slug}', function (string $slug) {
$page = Page::where('slug', $slug)->firstOrFail();
return view('pages.show', compact('page'));
})->name('page.show');
Definition of Done
- Can edit Terms of Service
- Can edit Privacy Policy
- Bilingual content works
- Preview works
- Public pages accessible
- Last updated shows
- Tests pass
Estimation
Complexity: Medium | Effort: 3-4 hours