0

使用 Botman 时,我无法通过 auth() 助手或外观 Auth:: 访问登录用户。

我的僵尸路线:

$botman->hears('t', function($bot) {
    info(auth()->id());
    //don't show anything
});

我的 routeServiceProvider.php :

public function map()
{
    $this->mapBotManCommands();
}

protected function mapBotManCommands()
{
    Route::middleware('web')
        ->namespace($this->namespace)
        ->group(base_path('routes/botman.php'));
}

我也可以在我的网络路由中正常检索登录用户

让我知道我是否做错了什么。如果需要,我可以详细说明一些要点。

4

0 回答 0