> */ protected $dontReport = [ // ]; /** * A list of the inputs that are never flashed for validation exceptions. * * @var array */ protected $dontFlash = [ 'current_password', 'password', 'password_confirmation', ]; /** * Register the exception handling callbacks for the application. * * @return void */ public function register() { $this->reportable(function (Throwable $e) { // }); $this->renderable(function (MethodNotAllowedHttpException $e, $request){ $respuesta = json_encode([ "error" => true, "msg" => "ERR_GLB_USU000: Método no soportado.", "response" => [] ]); return response($respuesta, 405)->header('Content-Type', 'application/json'); }); $this->renderable(function (QueryException $e, $request){ $respuesta = json_encode([ "error" => true, "msg" => "ERR_GLB_USU000: No se pudo establecer una conexión con la base de datos.", "response" => [] ]); return response($respuesta, 500)->header('Content-Type', 'application/json'); }); } }