Save the user ID of who created the component or incident

This commit is contained in:
manavo
2014-11-25 11:50:15 +00:00
parent e104a9a317
commit e994f2a88a
5 changed files with 78 additions and 2 deletions

View File

@@ -43,6 +43,7 @@
*/
public function postComponents() {
$component = new Component(Input::all());
$component->user_id = $this->auth->user()->id;
if ($component->isValid()) {
$component->saveOrFail();
return $component;
@@ -82,6 +83,7 @@
*/
public function postIncidents() {
$incident = new Incident(Input::all());
$incident->user_id = $this->auth->user()->id;
if ($incident->isValid()) {
$incident->saveOrFail();
return $incident;