mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 07:02:47 +08:00
404异常跳转URL配置参数 改为 异常模板地址参数 http_exception_template
This commit is contained in:
@@ -95,10 +95,10 @@ class Handle
|
||||
*/
|
||||
protected function renderHttpException(HttpException $e)
|
||||
{
|
||||
$status = $e->getStatusCode();
|
||||
$error = Config::get('http_exception_url');
|
||||
if (!APP_DEBUG && !empty($error[$status])) {
|
||||
return Response::create($error[$status], 'redirect')->send();
|
||||
$status = $e->getStatusCode();
|
||||
$template = Config::get('http_exception_template');
|
||||
if (!APP_DEBUG && !empty($template[$status])) {
|
||||
return Response::create($template[$status], 'view')->vars(['e' => $e])->send();
|
||||
} else {
|
||||
return $this->convertExceptionToResponse($e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user