I have a working crud code in laravel but my problem is the validation. Here is my code:

```
public function update(Request $request)
{
    $room_id =  $this->route('route');
    $validator = \Validator::make(\Request::all(), [
        'roomNumber' => 'required|unique:rooms,roomNumber,',
        'type' => 'required',
        'price' => 'required',
    ]);

    if(!$validator -> fails()){
        $id  = \Request::input('id');
        $com = Room::find($id);

        $room -> roomNumber = \Request::input('roomNumber', 'Test');
        $room -> type = \Request::input('type', 'Test');
        $room -> price = \Request::input('price', '0.00');
        $room -> description = \Request::input('description', 'Test');

        $com -> save();

        return redirect('rooms') -> with('message', 'Room Updated!');
    } else {
        return redirect('rooms') -> withErrors($validator->errors());
    }
}

```

As you can see, the roomNumber is required and should be unique. My problem is, this is the update code. What if I just want to update some field like the `price` or the `type`? Whenever I update a field I always get `The room number has already been taken.` in my view because yes, the roomNumber should be unique in my validation.

How can I update a specific field that will still check if the `room number` is unique but if the data I'm updating is in the same field, it will just update the other fields like the `type` and `price`? Please correct me if my question is vague. Thank you!

Example:

I have 2 data's in my rooms table

```
Data 1:
roomNumber: 214
type: Queen
price: 150.00

Data 2:
roomNumber: 619
type: Suite
price: 250.00

```

Now if I update the `Data 1` field `price` from `150.00` to `160.00`, I will get the validation error `The room number has already been taken.` because it will also validate the `roomNumber` when I update. How can I update it without validating the `roomNumber` if the data I'm updating is the same?