小编SK *_*oke的帖子

Laravel Fortify 自定义身份验证重定向

在 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
        }
Run Code Online (Sandbox Code Playgroud)

请帮我解决这个问题。

authentication redirect laravel fortify laravel-8

3
推荐指数
5
解决办法
9499
查看次数

标签 统计

authentication ×1

fortify ×1

laravel ×1

laravel-8 ×1

redirect ×1