Class PayloadNotificationBuilder
Official google documentation :
- Class name: PayloadNotificationBuilder
- Namespace: LaravelFCM\Message
mixed LaravelFCM\Message\PayloadNotificationBuilder::__construct(String $title)
Title must be present on android notification and ios (watch) notification
- Visibility: public
- $title String
\LaravelFCM\Message\PayloadNotificationBuilder LaravelFCM\Message\PayloadNotificationBuilder::setTitle(String $title)
Indicates notification title. This field is not visible on iOS phones and tablets.
but it is required for android
- Visibility: public
- $title String
\LaravelFCM\Message\PayloadNotificationBuilder LaravelFCM\Message\PayloadNotificationBuilder::setBody(String $body)
Indicates notification body text.
- Visibility: public
- $body String
\LaravelFCM\Message\PayloadNotificationBuilder LaravelFCM\Message\PayloadNotificationBuilder::setIcon(String $icon)
Supported Android Indicates notification icon. example : Sets value to myicon for drawable resource myicon.
- Visibility: public
- $icon String
\LaravelFCM\Message\PayloadNotificationBuilder LaravelFCM\Message\PayloadNotificationBuilder::setSound(String $sound)
Indicates a sound to play when the device receives a notification.
Supports default or the filename of a sound resource bundled in the app.
- Visibility: public
- $sound String
\LaravelFCM\Message\PayloadNotificationBuilder LaravelFCM\Message\PayloadNotificationBuilder::setBadge(String $badge)
Supported Ios
Indicates the badge on the client app home icon.
- Visibility: public
- $badge String
\LaravelFCM\Message\PayloadNotificationBuilder LaravelFCM\Message\PayloadNotificationBuilder::setTag(String $tag)
Supported Android
Indicates whether each notification results in a new entry in the notification drawer on Android. If not set, each request creates a new notification. If set, and a notification with the same tag is already being shown, the new notification replaces the existing one in the notification drawer.
- Visibility: public
- $tag String
\LaravelFCM\Message\PayloadNotificationBuilder LaravelFCM\Message\PayloadNotificationBuilder::setColor(String $color)
Supported Android
Indicates color of the icon, expressed in #rrggbb format
- Visibility: public
- $color String
\LaravelFCM\Message\PayloadNotificationBuilder LaravelFCM\Message\PayloadNotificationBuilder::setClickAction(String $action)
Indicates the action associated with a user click on the notification
- Visibility: public
- $action String
\LaravelFCM\Message\PayloadNotificationBuilder LaravelFCM\Message\PayloadNotificationBuilder::setTitleLocationKey(String $titleKey)
Indicates the key to the title string for localization.
- Visibility: public
- $titleKey String
\LaravelFCM\Message\PayloadNotificationBuilder LaravelFCM\Message\PayloadNotificationBuilder::setTitleLocationArgs(mixed $titleArgs)
Indicates the string value to replace format specifiers in the title string for localization.
- Visibility: public
- $titleArgs mixed
\LaravelFCM\Message\PayloadNotificationBuilder LaravelFCM\Message\PayloadNotificationBuilder::setBodyLocationKey(String $bodyKey)
Indicates the key to the body string for localization.
- Visibility: public
- $bodyKey String
\LaravelFCM\Message\PayloadNotificationBuilder LaravelFCM\Message\PayloadNotificationBuilder::setBodyLocationArgs(mixed $bodyArgs)
Indicates the string value to replace format specifiers in the body string for localization.
- Visibility: public
- $bodyArgs mixed
null|String LaravelFCM\Message\PayloadNotificationBuilder::getTitle()
Get title
- Visibility: public
null|String LaravelFCM\Message\PayloadNotificationBuilder::getBody()
Get body
- Visibility: public
null|String LaravelFCM\Message\PayloadNotificationBuilder::getIcon()
Get Icon
- Visibility: public
null|String LaravelFCM\Message\PayloadNotificationBuilder::getSound()
Get Sound
- Visibility: public
null|String LaravelFCM\Message\PayloadNotificationBuilder::getBadge()
Get Badge
- Visibility: public
null|String LaravelFCM\Message\PayloadNotificationBuilder::getTag()
Get Tag
- Visibility: public
null|String LaravelFCM\Message\PayloadNotificationBuilder::getColor()
Get Color
- Visibility: public
null|String LaravelFCM\Message\PayloadNotificationBuilder::getClickAction()
Get ClickAction
- Visibility: public
null|String LaravelFCM\Message\PayloadNotificationBuilder::getBodyLocationKey()
Get BodyLocationKey
- Visibility: public
null|String|array LaravelFCM\Message\PayloadNotificationBuilder::getBodyLocationArgs()
Get BodyLocationArgs
- Visibility: public
string LaravelFCM\Message\PayloadNotificationBuilder::getTitleLocationKey()
Get TitleLocationKey
- Visibility: public
null|String|array LaravelFCM\Message\PayloadNotificationBuilder::getTitleLocationArgs()
GetTitleLocationArgs
- Visibility: public
\LaravelFCM\Message\PayloadNotification LaravelFCM\Message\PayloadNotificationBuilder::build()
Build an PayloadNotification
- Visibility: public