Merge pull request #288 from cachethq/delete-component-group

Allow deleting of a component group. Closes #286
This commit is contained in:
Graham Campbell
2015-01-06 20:59:13 +00:00
7 changed files with 35 additions and 7 deletions

View File

@@ -144,6 +144,20 @@ class DashComponentController extends Controller
return Redirect::back();
}
/**
* Deletes a given component group.
*
* @param \CachetHQ\Cachet\Models\ComponentGroup $group
*
* @return \Illuminate\Http\RedirectResponse
*/
public function deleteComponentGroupAction(ComponentGroup $group)
{
$group->delete();
return Redirect::back();
}
/**
* Shows the add component group view.
*

View File

@@ -38,6 +38,7 @@ class RoutingServiceProvider extends ServiceProvider
protected function registerBindings()
{
$this->app->router->model('component', 'CachetHQ\Cachet\Models\Component');
$this->app->router->model('component_group', 'CachetHQ\Cachet\Models\ComponentGroup');
$this->app->router->model('incident', 'CachetHQ\Cachet\Models\Incident');
$this->app->router->model('incident_template', 'CachetHQ\Cachet\Models\IncidentTemplate');
$this->app->router->model('setting', 'CachetHQ\Cachet\Models\Setting');