Ejemplo n.º 1
0
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store()
 {
     $local = new Local();
     $local->nombre = Request::get('nombre');
     $local->direccion = Request::get('direccion');
     $local->telefono = Request::get('telefono');
     $local->funcionarioId = Request::get(Auth::user()->id);
     $local->funcionarioId = Auth::user()->id;
     // Validation and Filtering is sorely needed!!
     // Seriously, I'm a bad person for leaving that out.
     $local->save();
     return Response::json(array('error' => false, 'locales' => $local->toArray()), 200);
 }