Ejemplo n.º 1
0
 /**
  * Update the specified resource in storage.
  *
  * @param  Request  $request
  * @param  App\Room $room
  * @return Response
  */
 public function update(Request $request, Room $room)
 {
     $this->validate($request, ['room_type_id' => 'required|numeric', 'room_no' => 'required|unique:rooms,room_no,' . $room->id, 'status' => 'required|numeric']);
     $input = $request->all();
     $room->fill($input)->save();
     return redirect('/type/' . $room->roomType->slug);
 }