We can now update an incident

This commit is contained in:
Quentin Valmori
2015-01-02 20:35:02 +01:00
parent dda62e7e04
commit 831b433dd3
4 changed files with 90 additions and 0 deletions

View File

@@ -89,4 +89,34 @@ class DashIncidentController extends Controller
return Redirect::back();
}
/**
* Shows the edit incident view.
*
* @param \CachetHQ\Cachet\Models\Incident $incident
*
* @return \Illuminate\View\View
*/
public function showEditIncidentAction(Incident $incident)
{
return View::make('dashboard.incidents.edit')->with([
'pageTitle' => 'Edit Incident - Dashboard',
'incident' => $incident
]);
}
/**
* Edit an incident.
*
* @param \CachetHQ\Cachet\Models\Incident $incident
*
* @return \Illuminate\Http\RedirectResponse
*/
public function editIncidentAction(Incident $incident)
{
$_incident = Binput::get('incident');
$incident->update($_incident);
return Redirect::to('dashboard/incidents');
}
}