complete story 1.3 with qa test (please not that the previous commit msg was wrong the previous commit was story 1.2

This commit is contained in:
Naser Mansour
2025-12-26 14:23:09 +02:00
parent ebb6841ed0
commit ce5eaeffd9
19 changed files with 925 additions and 54 deletions
+14
View File
@@ -8,6 +8,20 @@ Route::get('/', function () {
return view('welcome');
})->name('home');
Route::get('/language/{locale}', function (string $locale) {
if (! in_array($locale, ['ar', 'en'])) {
abort(400);
}
session(['locale' => $locale]);
if (auth()->check()) {
auth()->user()->update(['preferred_language' => $locale]);
}
return redirect()->back();
})->name('language.switch');
Route::middleware(['auth', 'active'])->group(function () {
// Admin routes
Route::middleware('admin')->prefix('admin')->group(function () {