setting rule for unique name on existing row
Hello, in laravel 5.4 setting rule for unique name like
$rules = array( 'name' => 'required|unique:department,name', ...
Works ok inserting new department , but it finds itself when updating existing department and in profile I see:
select count(*) as aggregate from `jsn_department` where `name` = 'Department_111222'
I need also condition
... and department_id != 5
How to make it ?
Want to reply to this thread?Login with github.