protected function transformException(Exception $exception) { if (Request::capture()->wantsJson()) { $this->transformAuthException($exception); $this->transformEloquentException($exception); $this->transformValidationException($exception); } }