예제 #1
0
 /**
  * Delete an existing group.
  *
  * @param \CachetHQ\Cachet\Models\ComponentGroup $group
  *
  * @return \Illuminate\Http\JsonResponse
  */
 public function deleteGroup(ComponentGroup $group)
 {
     $group->delete();
     return $this->noContent();
 }
예제 #2
0
 /**
  * Deletes a given component group.
  *
  * @param \CachetHQ\Cachet\Models\ComponentGroup $group
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function deleteComponentGroupAction(ComponentGroup $group)
 {
     segment_track('Dashboard', ['event' => 'Deleted Component Group']);
     $group->components->map(function ($component) {
         $component->update(['group_id' => 0]);
     });
     $group->delete();
     return Redirect::back();
 }
예제 #3
0
 /**
  * Deletes a given component group.
  *
  * @param \CachetHQ\Cachet\Models\ComponentGroup $group
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function deleteComponentGroupAction(ComponentGroup $group)
 {
     $group->components->map(function ($component) {
         $component->update(['group_id' => 0]);
     });
     $group->delete();
     return Redirect::back();
 }
예제 #4
0
 /**
  * Deletes a given component group.
  *
  * @param \CachetHQ\Cachet\Models\ComponentGroup $group
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function deleteComponentGroupAction(ComponentGroup $group)
 {
     $group->components->map(function ($component) {
         $component->update(['group_id' => 0]);
     });
     $group->delete();
     return Redirect::route('dashboard.components.index');
 }