• PHP reference
  • Services
  • Notifications

Push

class Services\Notifications\Push

Class Push

Methods

static boolean fire(object $notification)

Fire off a notification via the push notification service.

Parameters

  • object $notification

Return Value

  • boolean

Exceptions

static string registerDevice(User|integer $user, string $certificate, string $token, string $title = null, mixed $attributes = [])

Register a device with the push notification service.

Parameters

  • User|integer $user
  • string $certificate
  • string $token
  • string $title
  • mixed $attributes

Return Value

  • string UUID of newly registered device

static boolean disableDevice(User|integer $user, string $deviceId)

Register a device with the push notification service.

Parameters

  • User|integer $user
  • string $deviceId

Return Value

  • boolean

static Device[] getDevicesForuser(User|integer $user)

Get devices for user.

Parameters

  • User|integer $user User ID or User object

Return Value

  • Device[] Array of device objects

static string getUUID(User|integer $user)

Get UUID of user that is used by the notifications service to identify the user.

Parameters

  • User|integer $user

Return Value

  • string