check authentication on Laravel schedule

后端 未结 2 1928
挽巷
挽巷 2021-01-20 19:54

I have schedule like this

$schedule->call(function () {
     $mial->getMail(Auth::user()->id);
})->everyMinute();

show me this

2条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-20 20:07

    You cannot check auth via the command line as a command does not have any information about the session. It is not concerned with HTTP / a browser at all

提交回复
热议问题