You are on page 1of 1

1.

go to auth file in config folder

2. got to password part > add frontend user below user details similarly as users'

For Ex:
'students'=>[
'provider'=>'students',
'table'=>'password_resets',
'expiry'=>60,
'throttle'=>60,
],

3. go to providers part, add frontend user below user details similarly as users'

For Ex:
'students' => [
'driver' => 'eloquent',
'model' => App\Models\Frontend\Student::class,
],

4. go to guard part, add frontend user below web details similarly as web

For Ex:
'student'=>[
'driver'=>'session',
'provider'=>'students',
],

5. change default guards to user from web and and same change in guard list part
too.(web to user or admin...)

6. got to redirectifauthenticated file and comment all content of handle functions


and add:

switch ($guards) {
case 'user':
if (Auth::guard($guards)->check()) {
return redirect()->route('admin.dashboard');
}
break;
case 'student':
if (Auth::guard($guards)->check()) {
return redirect()->route('frontend.home');
}
break;
default:
if (Auth::guard($guards)->check()) {
return redirect('/');
}
break;
}

___________________________________________________________________________________
___________________________________________________________________________
Now start frontend part :) :) :) :) :) :)

You might also like