Try the unique rule with with additional where clause
'name' => 'unique:games,name,NULL,id,user_id,'.$user->id
dhruvinprajapati liked this reply
If using auth:
public function rules() {
return [
'email' => 'required|email|unique:users,email,NULL,id,deleted_at,NULL,department_id,' . auth()->user()->department_id,
];
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community