我有一个单独的数据库来保存日志(log) 我有中间件,可以保存每个带有响应的请求
public function handle($request, Closure $next, $logType)
{
$response = $next($request);
CreateLog::dispatch($request, $response, $logType)->onQueue(config('queue.queues.logging'));
return $response;
}
在每项工作完成后,与身份验证进度相关的所有工作都会正常工作.信标u已使用$Response=$Next($Request);
'user_id' => auth()->id(),
try 以这种方式保存用户ID.一切都运行得很好 但在Prod服务器中,user_id为空
在使用docker运行的Prod Server项目中