如何重定向到laravel中的客户登录页面

问题描述

我用 laravel 开发了 multiauth 系统。我已经在路由上实现了中间件。

auth 用于管理员auth:customer 用于客户登录。我已经在路由上实现了这些中间件。所以现在我想要的是客户路线,如果客户没有登录,它应该在客户登录重定向,但目前它在管理员登录重定向

客户路线

Route::group(['middleware' => ['auth:customer']],function () {

    Route::get('/customer-read-notification',function () {
        Auth::guard('customer')->user()->unreadNotifications->markAsRead();
        return 1;
    });
   });

管理路由

Route::group(['middleware' => ['auth']],function () {
    Route::get('/staff-read-notification',function () {
        Auth::user()->unreadNotifications->markAsRead();
        return 1;
    });
 });

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)