Flugg\Responder\Exceptions\Http\ApiException::getStatusCode PHP Method

getStatusCode() public method

Get the HTTP status code,
public getStatusCode ( ) : integer
return integer
    public function getStatusCode()
    {
        return $this->statusCode;
    }

Usage Example

 /**
  * Renders any API exception into a JSON error response.
  *
  * @param  ApiException $exception
  * @return JsonResponse
  */
 protected function renderApiError(ApiException $exception) : JsonResponse
 {
     return app('responder.error')->setError($exception->getErrorCode(), $exception->getMessage())->addData($exception->getData() ?: [])->respond($exception->getStatusCode());
 }