浏览代码

Update Exception handler

Daniel Supernault 3 年之前
父节点
当前提交
c481e473d8
共有 1 个文件被更改,包括 12 次插入0 次删除
  1. 12 0
      app/Exceptions/Handler.php

+ 12 - 0
app/Exceptions/Handler.php

@@ -41,6 +41,18 @@ class Handler extends ExceptionHandler
 		parent::report($exception);
 	}
 
+	/**
+	* Register the exception handling callbacks for the application.
+	*
+	* @return void
+	*/
+	public function register()
+	{
+		$this->reportable(function (\BadMethodCallException $e) {
+			return app()->environment() !== 'production';
+		});
+	}
+
 	/**
 	 * Render an exception into an HTTP response.
 	 *