protected function push($service, $to, $data, PushMessage $message)
    {
        $this->push->setMessage($data)
            ->setService($service)
            ->setDevicesToken($to);

        if (! empty($message->config)) {
            $this->push->setConfig($message->config);

            if (! empty($message->config['apiKey'])) {
                $this->push->setApiKey($message->config['apiKey']);
            }
        }

        $feedback = $this->push->send()
            ->getFeedback();

        $this->broadcast();

        return $feedback;
    }
protected function push($service, $to, $data, PushMessage $message)
    {
        $this->push->setMessage($data)
            ->setService($service)
            ->setDevicesToken($to);

        if (! empty($message->config)) {
            $this->push->setConfig($message->config);

            if (! empty($message->config['apiKey'])) {
                $this->push->setApiKey($message->config['apiKey']);
            }
        }

        $feedback = $this->push->send()
            ->getFeedback();

        $this->broadcast();

        return $feedback;
    }
protected function push ( $ service , $ to , $ data , PushMessage $ message ) { $ this -> push -> setMessage ( $ data ) -> setService ( $ service ) -> setDevicesToken ( $ to ) ; if ( ! empty ( $ message -> config ) ) { $ this -> push -> setConfig ( $ message -> config ) ; if ( ! empty ( $ message -> config [ 'apiKey' ] ) ) { $ this -> push -> setApiKey ( $ message -> config [ 'apiKey' ] ) ; } } $ feedback = $ this -> push -> send ( ) -> getFeedback ( ) ; $ this -> broadcast ( ) ; return $ feedback ; }
Send the push notification.

@param  string $service
@param  mixed $to
@param  array $data
@param  \Edujugon\PushNotification\Messages\PushMessage $message
@return mixed
Send the push notification .