you just set redirection in Auth Controller protected $redirectTo = '/home'; Auth middleware return redirect()->guest('login');
Thanks
public function handle($request, Closure $next, $guard = null) { if (Auth::guard($guard)->guest()) { if ($request->ajax() || $request->wantsJson()) { return response('Unauthorized.', 401); } else { return redirect()->guest('signin'); } }
return $next($request);
}
this is my new code i think this working now
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community