From d8a271adb46bdae4a244dda5e5808bb27c4aa638 Mon Sep 17 00:00:00 2001 From: decoder Date: Tue, 19 Mar 2024 11:00:29 +0500 Subject: [PATCH] fix bug in auth --- app/Http/Controllers/FormController.php | 5 +++++ routes/web.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/FormController.php b/app/Http/Controllers/FormController.php index 187e989..7ab9890 100644 --- a/app/Http/Controllers/FormController.php +++ b/app/Http/Controllers/FormController.php @@ -16,6 +16,11 @@ use ZipArchive; class FormController extends Controller { + + public function __construct() { + $this->middleware('auth'); + } + /** * Display a listing of the resource. * diff --git a/routes/web.php b/routes/web.php index f50a1b8..98934e6 100644 --- a/routes/web.php +++ b/routes/web.php @@ -42,7 +42,7 @@ Route::middleware(['IsInstalled'])->group(function () { Route::post('registration', [RegistrationController::class, 'store']); }); -Route::middleware(['locale', 'IsInstalled', 'auth', 'bootstrap', 'setDefaultConfig'])->group(function () { +Route::middleware(['IsInstalled', 'auth', 'bootstrap', 'setDefaultConfig', 'locale',])->group(function () { Route::get('/home', [HomeController::class, 'index'])->name('home'); Route::get('/home-template', [HomeController::class, 'getTemplate']); Route::get('/home-assigned-forms', [HomeController::class, 'getAssignedForms']);