Esempio n. 1
0
 /**
  * @param int $notification_group_id
  *
  * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
  */
 public function getEditGroup(int $notification_group_id)
 {
     $group = NotificationGroup::with('integrations', 'alerts', 'affiliations')->where('id', $notification_group_id)->first();
     $integrations = Integration::all();
     $all_characters = $this->getAllCharacters();
     $all_corporations = $this->getAllCorporations();
     return view('notifications::groups.edit', compact('group', 'integrations', 'all_characters', 'all_corporations'));
 }
Esempio n. 2
0
 /**
  * @return \Illuminate\Support\Collection
  */
 public function getNotificationGroups() : Collection
 {
     // Return the groups we already found if we have.
     if ($this->groups) {
         return $this->groups;
     }
     // Get the groups that are applicable to this
     // notification type.
     $this->groups = NotificationGroup::with('alerts')->whereHas('alerts', function ($query) {
         $query->where('alert', $this->name);
     })->where('type', $this->type)->get();
     return $this->groups;
 }