src/Pushman.php
public function push($event, $channel = 'public', array $payload = [])
    {
        $payload = $this->preparePayload($payload);
        $this->validateEvent($event);
        $channels = $this->validateChannel($channel);

        $url = $this->getURL();

        $headers = [
            'body' => [
                'private'  => $this->privateKey,
                'channels' => $channels,
                'event'    => $event,
                'payload'  => $payload
            ]
        ];

        $response = $this->processRequest($url, $headers);

        return $response;
    }
public function push($event, $channel = 'public', array $payload = [])
    {
        $payload = $this->preparePayload($payload);
        $this->validateEvent($event);
        $channels = $this->validateChannel($channel);

        $url = $this->getURL();

        $headers = [
            'body' => [
                'private'  => $this->privateKey,
                'channels' => $channels,
                'event'    => $event,
                'payload'  => $payload
            ]
        ];

        $response = $this->processRequest($url, $headers);

        return $response;
    }
public function push ( $ event , $ channel = 'public' , array $ payload = [ ] ) { $ payload = $ this -> preparePayload ( $ payload ) ; $ this -> validateEvent ( $ event ) ; $ channels = $ this -> validateChannel ( $ channel ) ; $ url = $ this -> getURL ( ) ; $ headers = [ 'body' => [ 'private' => $ this -> privateKey , 'channels' => $ channels , 'event' => $ event , 'payload' => $ payload ] ] ; $ response = $ this -> processRequest ( $ url , $ headers ) ; return $ response ; }
Push an event to Pushman, the most used command.

@param        $event
@param string $channel
@param array  $payload
@return string
@throws \Pushman\PHPLib\Exceptions\InvalidChannelException
@throws \Pushman\PHPLib\Exceptions\InvalidEventException
Push an event to Pushman the most used command .