src/ResponseTrait.php
protected function getSuccessResponse($data, $statusText, $headers = [])
    {
        return $this->setStatusText($this->statusTexts[$statusText])
                    ->setStatusCode($statusText)
                    ->setStatusMessage(self::SUCCESS_TEXT)
                    ->respondWithSuccessMessage($data, $headers);
    }
protected function getSuccessResponse($data, $statusText, $headers = [])
    {
        return $this->setStatusText($this->statusTexts[$statusText])
                    ->setStatusCode($statusText)
                    ->setStatusMessage(self::SUCCESS_TEXT)
                    ->respondWithSuccessMessage($data, $headers);
    }
protected function getSuccessResponse ( $ data , $ statusText , $ headers = [ ] ) { return $ this -> setStatusText ( $ this -> statusTexts [ $ statusText ] ) -> setStatusCode ( $ statusText ) -> setStatusMessage ( self :: SUCCESS_TEXT ) -> respondWithSuccessMessage ( $ data , $ headers ) ; }
Gets the success response

@param array $data
@param string $statusText
@param array $headers
@return json
Gets the success response