【发布时间】:2020-11-17 15:21:30
【问题描述】:
从路由服务创建路由文件提供并分配中间件“admin.auth”,这个中间件在 web.php 中工作,提供管理员用户的基本信息,但从 custom.php 它返回 auth false。 admin.auth 如何从路由服务提供商那里工作
protected function mapWebRoutes2()
{
Route::group([
'namespace' => $this->namespace,
'prefix' => 'custom',
'middleware' => 'admin.auth'
], function ($router) {
require base_path('routes/custom.php');
});
}
【问题讨论】: