From e3ab6397d933918e5c5fd54e76648d05180c0729 Mon Sep 17 00:00:00 2001 From: sayliraut Date: Fri, 24 May 2024 18:46:52 +0530 Subject: [PATCH] change --- .../Controllers/Admin/LoginController.php | 1 - app/Providers/AuthServiceProvider.php | 33 +++++++++++++++++++ routes/web.php | 3 +- 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 app/Providers/AuthServiceProvider.php diff --git a/app/Http/Controllers/Admin/LoginController.php b/app/Http/Controllers/Admin/LoginController.php index 4b43cbb..cd0291a 100644 --- a/app/Http/Controllers/Admin/LoginController.php +++ b/app/Http/Controllers/Admin/LoginController.php @@ -24,7 +24,6 @@ class LoginController extends Controller public function login(Request $request) { - dd($request); $validatedData = $request->validate([ 'email' => 'required|email', 'password' => 'required|string', diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php new file mode 100644 index 0000000..6624efb --- /dev/null +++ b/app/Providers/AuthServiceProvider.php @@ -0,0 +1,33 @@ + + */ + protected $policies = [ + // + ]; + + /** + * Register any authentication / authorization services. + */ + public function boot() + { + $this->registerPolicies(); + + // Register 'admin' guard + Auth::extend('admin', function ($app, $name, array $config) { + return new \Illuminate\Auth\SessionGuard($name, $this->app['session.store']); + }); + } +} diff --git a/routes/web.php b/routes/web.php index 7a37aaa..eeb17f5 100644 --- a/routes/web.php +++ b/routes/web.php @@ -29,6 +29,7 @@ Route::post('/otp_verify', [LoginController::class, 'verify_otp']); Route::get('/password_reset', [LoginController::class, 'reset_password_page']); Route::post('/password_update', [LoginController::class, 'updatePassword']); +// Route::group(['middleware' => ['checkStatus']], function () { Route::get('/dashboard', [DashboardController ::class, 'index'])->name('dashboard'); @@ -74,6 +75,6 @@ Route::get('/manage-feedback', [ManageFeedbackController ::class, 'index'])->na //*******************************************************manage notification******************************************************** Route::get('/manage-notification', [ManageNotificationsController ::class, 'index'])->name('manage.notification'); - +// });