seems it's not possible with built-in validators, how I should implement this feature in the model?
$rules = [
'user_id' => 'required|unique:service_details,user_id',
'service_id'=>'required|unique:service_details,service_id'
];
above will prevent duplicacy of user_id
and service_id
independently which is not my requirement
it will reject
(1,2)
(1,3)
because 1 is duplicate but it should be accepted as i want composite unique key
See Question&Answers more detail:os