public function send($content = null, $status = null)
    {
        // Render json when content is array
        if (is_array($content)) {
            return $this->json($content)->send();
        } elseif (null !== $content) {
            $this->setContent($content);
        }

        if (null !== $status) {
            $this->setStatusCode($status);
        }

        // Trigger the after send callback
        $this->beforeSend && call_user_func($this->beforeSend, $this, $content);

        $this->sendHeader();
        $this->sendContent();

        // Trigger the after send callback
        $this->afterSend && call_user_func($this->afterSend, $this);

        return $this;
    }
public function send($content = null, $status = null)
    {
        // Render json when content is array
        if (is_array($content)) {
            return $this->json($content)->send();
        } elseif (null !== $content) {
            $this->setContent($content);
        }

        if (null !== $status) {
            $this->setStatusCode($status);
        }

        // Trigger the after send callback
        $this->beforeSend && call_user_func($this->beforeSend, $this, $content);

        $this->sendHeader();
        $this->sendContent();

        // Trigger the after send callback
        $this->afterSend && call_user_func($this->afterSend, $this);

        return $this;
    }
public function send ( $ content = null , $ status = null ) { // Render json when content is array if ( is_array ( $ content ) ) { return $ this -> json ( $ content ) -> send ( ) ; } elseif ( null !== $ content ) { $ this -> setContent ( $ content ) ; } if ( null !== $ status ) { $ this -> setStatusCode ( $ status ) ; } // Trigger the after send callback $ this -> beforeSend && call_user_func ( $ this -> beforeSend , $ this , $ content ) ; $ this -> sendHeader ( ) ; $ this -> sendContent ( ) ; // Trigger the after send callback $ this -> afterSend && call_user_func ( $ this -> afterSend , $ this ) ; return $ this ; }
Send response header and content

@param  string $content
@param  int $status
@return $this
Send response header and content