middleware

This commit is contained in:
2018-10-28 23:08:28 -05:00
parent 1faa5adc7b
commit 5bc0e69bb7

View File

@@ -26,9 +26,10 @@ class RedirectIfAuthenticated
*/
public function handle($request, Closure $next, $guard = null)
{
dd($request);
if($request->pathInfo == '/login') {
if (Auth::guard($guard)->check()) {
return redirect('/dashboard')->with('Sucess', '/login path');
return redirect('/dashboard');
}
return $next($request);