class Illuminate / Validation / Rules / Unique

Unique

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.