Create incidents from the dashboard index

This commit is contained in:
James Brooks
2014-12-13 12:22:06 +00:00
parent c124f193aa
commit f68383427a
5 changed files with 98 additions and 8 deletions
+9
View File
@@ -9,6 +9,15 @@ class DashboardController extends Controller {
return View::make('dashboard.index');
}
public function createIncidentAction() {
$_incident = Input::get('incident');
$_incident['user_id'] = Auth::user()->id;
$incident = Incident::create($_incident);
return Redirect::back()->with('incident', $incident);
}
/**
* Shows the components view.
* @return \Illuminate\View\View