/** * 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); }