addMultipleCategoriesToGroup() public method

Add Multiple categories in a group First parameter is the group name all the rest are categories.
Example #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());
 }
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire()
 {
     $arguments = $this->getArgumentsConsole();
     $groupCategories = $this->notifynderGroup->addMultipleCategoriesToGroup($arguments);
     if ($groupCategories) {
         foreach ($groupCategories->categories as $category) {
             $this->info("Category {$category->name} has been associated to the group {$groupCategories->name}");
         }
     } else {
         $this->error('The name must be a string with dots as namespaces');
     }
 }
 /**
  * Add categories to a group having as first parameter
  * the name of the group, and others as name
  * categories
  *
  * @return mixed
  */
 public function addCategoriesToGroup()
 {
     return $this->notifynderGroup->addMultipleCategoriesToGroup(func_get_args());
 }