[英]Why request() helper return empty array?
我想在Error Handler中的report()函数中使用请求信息,但是无法获取它。
public function report(Exception $exception)
{
$request = request();
// -> empty array
parent::report($exception);
}
为什么request()helper返回空数组? 谢谢。
您可以使用网址助手:
url()->current();
要么
url()->full();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.