Can you add this to your model ?
protected $rules = [
'Column_name' => 'unique:yourmodel',
..
];
I suggest you to try this code
$emp_id = Request::get('emp_id', $default);
$rules = [
'emp_id' => 'unique:emp_details,emp_id,NULL,id....'. ..
];
Let me know if you face problem
I found the solution we can pass id along with check to overcome this problem:
"unique:<table>,<column>,"$id
like that.
Thank you @Cameron and @Pardeeptech :-)
Where/how are you using that snytax? Maybe I've been doing it wrong lol. "unique:<table>,<column>,"$id
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community