|
@@ -14,7 +14,7 @@ class Handler
|
|
|
*
|
|
*
|
|
|
* @return string
|
|
* @return string
|
|
|
*/
|
|
*/
|
|
|
- public static function renderException(\Throwable $exception)
|
|
|
|
|
|
|
+ public function renderException(\Throwable $exception)
|
|
|
{
|
|
{
|
|
|
if (config('app.debug')) {
|
|
if (config('app.debug')) {
|
|
|
throw $exception;
|
|
throw $exception;
|
|
@@ -33,26 +33,12 @@ class Handler
|
|
|
return view('admin::partials.exception', compact('errors'))->render();
|
|
return view('admin::partials.exception', compact('errors'))->render();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
- * Flash a error message to content.
|
|
|
|
|
- *
|
|
|
|
|
- * @param string $title
|
|
|
|
|
- * @param string $message
|
|
|
|
|
- *
|
|
|
|
|
- * @return mixed
|
|
|
|
|
- */
|
|
|
|
|
- public static function error($title = '', $message = '')
|
|
|
|
|
- {
|
|
|
|
|
- $error = new MessageBag(compact('title', 'message'));
|
|
|
|
|
-
|
|
|
|
|
- return session()->flash('error', $error);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* @param \Throwable $e
|
|
* @param \Throwable $e
|
|
|
|
|
+ *
|
|
|
* @return mixed
|
|
* @return mixed
|
|
|
*/
|
|
*/
|
|
|
- public static function handleDestroyException(\Throwable $e)
|
|
|
|
|
|
|
+ public function handleDestroyException(\Throwable $e)
|
|
|
{
|
|
{
|
|
|
$root = dirname(app_path());
|
|
$root = dirname(app_path());
|
|
|
|
|
|