Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel rule unique ignore

use IlluminateSupportFacadesValidator;
use IlluminateValidationRule;

Validator::make($data, [
    'email' => [
        'required',
        Rule::unique('users')->ignore($user->id),
    ],
]);
 
PREVIOUS NEXT
Tagged: #laravel #rule #unique #ignore
ADD COMMENT
Topic
Name
3+5 =