在Laravel Fortify中自定义身份验证过程时,我无法像在Auth中那样重定向到带有错误消息的登录页面。以下是自定义文档链接: https://jetstream.laravel.com/1.x/features/authentication.html#customizing-the-authentication-process
if ($user && Hash::check($request->password, $user->password) && $user->status == 'active') {
return $user;
} elseif ($user->status == 'inactive') {
//redirect with some error message to login blade
} elseif ($user->status == 'blocked') {
//redirect with some error message to login blade
}
请帮助我解决这个问题。
null
或false
,但您将没有任何自定义消息。 - lagbox