You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.
This make me login as gust user, Why ??
public function postLogin(Request $request)
{
$credentials = $request->only('username', 'password');
if (\Auth::userx()->attempt($credentials)) {
// Authentication passed...
return redirect()->intended($this->redirectPath());
}
This make me login as gust user, Why ??
public function postLogin(Request $request)
{
$credentials = $request->only('username', 'password');
if (\Auth::userx()->attempt($credentials)) {
// Authentication passed...
return redirect()->intended($this->redirectPath());
}
public function handle($request, Closure $next)
{
dd($this->auth->guest()); ---> True
if ($this->auth->guest()) {
if ($request->ajax()) {
return response('Unauthorized.', 401);
} else {
return redirect()->guest('auth/login');
}
}
protected $routeMiddleware = [
'auth' => \App\Http\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
];
The text was updated successfully, but these errors were encountered: