unique rule with where condition in laravel validation code example
Example: laravel rule unique where
'required|email|unique:company_users,email_address,NULL,id,company_id,' . $request->company_id
'required|email|unique:company_users,email_address,NULL,id,company_id,' . $request->company_id