FCMClient.php
public function createDeviceNotification($title = null, $body = null, $token = array())
    {
        $notification = new DeviceNotification();
        $notification
            ->setTitle($title)
            ->setBody($body);

        if(is_array($token)){
            $notification->setDeviceTokens($token);
        } else {
            $notification->addDeviceToken($token);
        }

        return $notification;
    }
public function createDeviceNotification($title = null, $body = null, $token = array())
    {
        $notification = new DeviceNotification();
        $notification
            ->setTitle($title)
            ->setBody($body);

        if(is_array($token)){
            $notification->setDeviceTokens($token);
        } else {
            $notification->addDeviceToken($token);
        }

        return $notification;
    }
public function createDeviceNotification ( $ title = null , $ body = null , $ token = array ( ) ) { $ notification = new DeviceNotification ( ) ; $ notification -> setTitle ( $ title ) -> setBody ( $ body ) ; if ( is_array ( $ token ) ) { $ notification -> setDeviceTokens ( $ token ) ; } else { $ notification -> addDeviceToken ( $ token ) ; } return $ notification ; }
Create a notification of type Device Notification

@param null $title
@param null $body
@param null | array $token
@return DeviceNotification
Create a notification of type Device Notification