sendGroup() public method

Send a group of notifications at once.
public sendGroup ( $groupName, array $info = [] ) : mixed
$groupName
$info array
return mixed
Beispiel #1
0
 /** @test */
 public function it_send_a_group_of_notification()
 {
     $group = $this->createGroup(['name' => 'mygroud']);
     $category1 = $this->createCategory();
     $category2 = $this->createCategory();
     $category3 = $this->createCategory();
     $this->group->addMultipleCategoriesToGroup($group->name, $category1->name, $category2->name, $category3->name);
     $this->senders->sendGroup($group->name, ['from_id' => 1, 'to_id' => 2, 'url' => 'www.notifynder.io']);
     $this->assertCount(3, Notification::all());
 }
Beispiel #2
0
 /**
  * Send a group of notifications.
  *
  * @param $groupName
  * @param $info
  * @return mixed
  */
 public function sendGroup($groupName, $info = [])
 {
     $info = count($info) > 0 ? $info : $this->toArray();
     $notificationsSent = $this->notifynderSender->sendGroup($this, $groupName, $info);
     $this->refresh();
     return $notificationsSent;
 }
 /**
  * Send a group of notifications
  *
  * @param $group_name
  * @param $info
  * @return mixed
  */
 public function sendGroup($group_name, $info = [])
 {
     $info = count($info) > 0 ? $info : $this->toArray();
     return $this->notifynderSender->sendGroup($this, $group_name, $info);
 }