Skip to content

Commit f6ed0fa

Browse files
author
Azri Ismail
committed
set icon badge number
1 parent 2fee18e commit f6ed0fa

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/FirebaseMessage.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,40 @@ public function title($value)
6060
return $this;
6161
}
6262

63+
/**
64+
* Set notification sound
65+
*
66+
* @param string $value
67+
*
68+
* @return $this
69+
*/
6370
public function sound($value = 'default')
6471
{
6572
$this->notification->setSound($value);
6673

6774
return $this;
6875
}
6976

77+
/**
78+
* Set badge number
79+
*
80+
* @param int $integer
81+
*
82+
* @return $this
83+
*/
84+
public function badge($integer)
85+
{
86+
$this->notification->setBadge($integer);
87+
88+
return $this;
89+
}
90+
91+
/**
92+
* Set additional data
93+
*
94+
* @param array $values
95+
* @return $this
96+
*/
7097
public function data(array $values = [])
7198
{
7299
$this->data = $values;

0 commit comments

Comments
 (0)