示例#1
0
 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(RoomRequest $request, $id)
 {
     $input = $request->except('_method', '_token');
     $room = Room::findOrFail($id);
     if ($room->update($input)) {
         return redirect('/rooms');
     }
 }
 /**
  * Update the specified resource in storage.
  *
  * @param Requests\RoomRequest|Request $request
  * @param Room $room
  * @return \Illuminate\Http\Response
  */
 public function update(Requests\RoomRequest $request, Room $room)
 {
     $room->update($request->only(['name', 'activeduration', 'tempsensorpath', 'relaispath', 'temperature']));
     return $room->fresh(['timeslots']);
 }