Create components from the dashboard

This commit is contained in:
James Brooks
2014-12-13 12:43:11 +00:00
parent 5853aa3f94
commit 5420ff91f7
5 changed files with 30 additions and 11 deletions
+7 -2
View File
@@ -11,8 +11,6 @@ class DashboardController extends Controller {
public function createIncidentAction() {
$_incident = Input::get('incident');
$_incident['user_id'] = Auth::user()->id;
$incident = Incident::create($_incident);
return Redirect::back()->with('incident', $incident);
@@ -31,6 +29,13 @@ class DashboardController extends Controller {
]);
}
public function createComponentAction() {
$_component = Input::get('component');
$component = Component::create($_component);
return Redirect::back()->with('component', $component);
}
/**
* Shows the incidents view.
* @return \Illuminate\View\View