/** * Delete an existing group. * * @param \CachetHQ\Cachet\Models\ComponentGroup $group * * @return \Illuminate\Http\JsonResponse */ public function deleteGroup(ComponentGroup $group) { $group->delete(); return $this->noContent(); }
/** * 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(); }
/** * 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(); }
/** * 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'); }