laravauth icon indicating copy to clipboard operation
laravauth copied to clipboard

Redirect Issue

Open MonMohon opened this issue 5 years ago • 0 comments

First of all thanks for very nice and valuable package.

i've a protected function redirect based on user role. Ref: https://www.5balloons.info/user-role-based-authentication-and-access-control-in-laravel/

please tell me how do i implement in your package

protected function authenticated($request, $user) { if($user->hasRole('ROLE_OWNER')) { return redirect('/owner'); } elseif ($user->hasRole('ROLE_TRAINER')) { return redirect('trainer'); } else { return redirect('/home'); } }

MonMohon avatar Apr 30 '19 12:04 MonMohon