This commit is contained in:
sayliraut
2024-05-24 18:46:52 +05:30
parent 5d9031f5e1
commit e3ab6397d9
3 changed files with 35 additions and 2 deletions

View File

@@ -24,7 +24,6 @@ class LoginController extends Controller
public function login(Request $request)
{
dd($request);
$validatedData = $request->validate([
'email' => 'required|email',
'password' => 'required|string',

View File

@@ -0,0 +1,33 @@
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Gate;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Auth;
class AuthServiceProvider extends ServiceProvider
{
/**
* The model to policy mappings for the application.
*
* @var array<class-string, class-string>
*/
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']);
});
}
}

View File

@@ -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');
// });