How to laravel update model with a unique validation
Pass the id of your instance to ignore the unique validation. In the validator, use a parameter to detect if you are updating or creating the resource.
$Id = isset($user) ? $user->id : null;
$rules = [
'email' => 'required|email|unique:users,email,'. $Id.',id',
'contact_no' => 'required|unique:users,contact_no,'. $Id.',id',
];
$this->validate($request, $rules);