It is a field unique verification, in addition to itself, there are soft deleted records
某草草2017-05-16 16:50:14
Use the following method
'email' => Rule::unique('users')->where(function ($query) {
$query->whereNotNull('deleted_at')->whereNot('id', 4);
})
Refer to the official documentation https://laravel.com/docs/5.4/...