xuzhengzong

1、处理自定义错误或不存在页面:生产环境一定要关闭debug模式。

 

public function render($request, Exception $exception)
{
    if ($exception) {
        return response()->view(\'error.\'.$exception->getStatusCode(), [],$exception->getStatusCode());
    }
    return parent::render($request, $exception);
}

 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
  • 2021-07-23
  • 2021-09-09
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-10
  • 2021-06-27
  • 2021-09-27
  • 2021-09-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案