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
+16 -6
View File
@@ -18,13 +18,15 @@ Route::get('/booking', function () {
Volt::route('/posts', 'pages.posts.index')->name('posts.index');
Volt::route('/posts/{post}', 'pages.posts.show')->name('posts.show');
Route::get('/terms', function () {
return view('pages.terms');
})->name('terms');
Route::get('/page/{slug}', function (string $slug) {
$page = \App\Models\Page::query()->where('slug', $slug)->firstOrFail();
Route::get('/privacy', function () {
return view('pages.privacy');
})->name('privacy');
return view('pages.legal', ['page' => $page]);
})->name('page.show')->where('slug', 'terms|privacy');
// Legacy routes for backward compatibility
Route::redirect('/terms', '/page/terms')->name('terms');
Route::redirect('/privacy', '/page/privacy')->name('privacy');
Route::get('/language/{locale}', function (string $locale) {
if (! in_array($locale, ['ar', 'en'])) {
@@ -93,6 +95,14 @@ Route::middleware(['auth', 'active'])->group(function () {
Volt::route('/blocked-times', 'admin.settings.blocked-times')->name('blocked-times');
});
// Legal Pages Management
Route::prefix('pages')->name('admin.pages.')->group(function () {
Volt::route('/', 'admin.pages.index')->name('index');
Volt::route('/{slug}/edit', 'admin.pages.edit')
->name('edit')
->where('slug', 'terms|privacy');
});
// Posts Management
Route::prefix('posts')->name('admin.posts.')->group(function () {
Volt::route('/', 'admin.posts.index')->name('index');