Endroid\Gcm\Client::sendTo PHP Method

sendTo() public method

Sends the data to the given registration token, notification key, or topic via the GCM server.
public sendTo ( mixed $data, string $topic = '/topics/global', array $options = [] ) : boolean
$data mixed
$topic string The value must be a registration token, notification key, or topic. Default global topic.
$options array to add along with message, such as collapse_key, time_to_live, delay_while_idle
return boolean
    public function sendTo($data, $topic = '/topics/global', array $options = array())
    {
        $options['to'] = $topic;
        return $this->send($data, array(), $options);
    }