class
Illuminate
/
Validation
/
Rules
/
Unique
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.
Unique
Implements
- Stringable
Uses
Properties
protected
$ignore mixed
The ID that should be ignored.
Default: null
protected
$idColumn string
The name of the ID column.
Default: 'id'
Methods
public
ignore ( $id , $idColumn ) : $this
Ignore the given ID during the unique check.
Parameters
- $id mixed
- $idColumn string|null
public
ignoreModel ( $model , $idColumn ) : $this
Ignore the given model during the unique check.
Parameters
- $model Model
- $idColumn string|null
public
__toString ( ) : string
Convert the rule to a validation string.