Closed mostafa6765 closed 7 years ago
login from two different browser one for user and another for admin and test again! hope it helps
Solution is to overwrite the logout function, Add following lines in AdminLoginController
class AdminLoginController extends Controller {
//
/**
* Log the user out of the application.
* Redirect to admin login page
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function logout(Request $request)
{
$this->guard()->logout();
$request->session()->flush();
$request->session()->regenerate();
return redirect('/admin'); // default is 'redirect('/')'
}
//
}
Thank you for specifying that @cham11ng. That is the correct solution.
New video going live May 22 addresses creating a specific logout function exclusively for each type of user. In the video we add the redirect line and I leave it at the return redirect('/');
but of course you can always customize that route that you want to redirect, to be anything your application requires.
Code for the video has been updated and you can view the changelog here: https://github.com/DevMarketer/multiauth_tutorial/commit/558bc66d783841c724cc556679fa9218f184c3f2?diff=split
When Admin
Log out
the page redirect tohome page
.how can redirectadmin log in page
whenadmin log out
.