/**
  * Handle the command.
  *
  * @param Decorator $decorator
  * @return LinkCollection
  */
 public function handle(Decorator $decorator)
 {
     $links = $this->group->getLinks();
     $this->dispatch(new SetCurrentLink($links));
     $this->dispatch(new SetActiveLinks($links));
     return $decorator->decorate($links);
 }
 /**
  * Handle the command.
  *
  * @param LinkRepositoryInterface $links
  */
 public function handle(LinkRepositoryInterface $links)
 {
     foreach ($this->group->getLinks() as $link) {
         $links->delete($link);
     }
 }
 /**
  * Return links belonging to
  * the provided group.
  *
  * @param GroupInterface $group
  * @return LinkCollection
  */
 public function findAllByGroup(GroupInterface $group)
 {
     return $this->model->where('group_id', $group->getId())->get();
 }