Inheritance: extends Illuminate\Database\Eloquent\Model
 /**
  * Add multiple categories by them names
  * to a group
  *
  * @param $group_name
  * @param $names
  * @return mixed
  */
 public function addMultipleCategoriesToGroup($group_name, array $names)
 {
     $group = $this->notificationGropup->where('name', $group_name)->first();
     $categories = $this->notificationCategory->findByNames($names);
     foreach ($categories as $category) {
         $group->categories()->attach($category->id);
     }
     return $group;
 }
 /** @test */
 function it_delete_a_group_by_id()
 {
     $group = $this->createGroup();
     $this->group->delete($group->id);
     $this->assertCount(0, NotificationGroup::all());
 }
 /**
  * Delete a group
  *
  * @param $group_id
  * @return mixed
  */
 public function delete($group_id)
 {
     return $this->groupModel->where('id', $group_id)->delete();
 }