mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-27 06:29:19 +08:00
show custom error page when APP_DEBUG is false
This commit is contained in:
parent
70bed0c4c3
commit
2ee71b6d98
@ -7,7 +7,7 @@
|
||||
# https://github.com/printempw/blessing-skin-server/wiki/.env-%E5%AD%97%E6%AE%B5%E5%90%AB%E4%B9%89%E8%AF%A6%E8%A7%A3
|
||||
|
||||
# Be sure to disable debug at production environment!
|
||||
APP_DEBUG = true
|
||||
APP_DEBUG = false
|
||||
APP_ENV = production
|
||||
|
||||
# =========================
|
||||
|
@ -82,7 +82,7 @@ class Handler extends ExceptionHandler
|
||||
return $this->renderExceptionWithWhoops($e);
|
||||
}
|
||||
|
||||
return parent::render($request, $e);
|
||||
return response()->view('errors.brief', ['code' => 0, 'message' => 'cmn']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -6,6 +6,9 @@ http:
|
||||
general:
|
||||
title: Error occurred
|
||||
|
||||
brief:
|
||||
message: Whoops, looks like something went wrong.
|
||||
|
||||
exception:
|
||||
title: Some errors occurred
|
||||
code: 'Error code: :code'
|
||||
|
@ -6,6 +6,9 @@ http:
|
||||
general:
|
||||
title: 出现错误
|
||||
|
||||
brief:
|
||||
message: 哎呀,你似乎触发了一个错误
|
||||
|
||||
exception:
|
||||
title: 出现了一些错误
|
||||
code: 错误码::code
|
||||
|
10
resources/views/errors/brief.tpl
Normal file
10
resources/views/errors/brief.tpl
Normal file
@ -0,0 +1,10 @@
|
||||
@extends('errors.general')
|
||||
|
||||
@section('title', trans('errors.general.title'))
|
||||
|
||||
@section('content')
|
||||
<h1>{{ trans('errors.general.title') }}</h1>
|
||||
|
||||
<p>{{ trans('errors.brief.message') }}</p>
|
||||
|
||||
@endsection
|
Loading…
Reference in New Issue
Block a user