/** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(Request $request, RentalUnit $rentalUnit) { //Use fill() to automatically fill in the fields $rentalUnit->fill(Input::all()); $rentalUnit->save(); return Response::json($rentalUnit); }