在 Laravel fortify on custom authentication process 中,我无法重定向到带有错误消息的登录页面,而我们在 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
}
请帮我解决这个问题。