class
Illuminate
/
Validation
/
DatabasePresenceVerifier
You are viewing an older version of the documentation. For the latest, please visit master documentation.
DatabasePresenceVerifier
Implements
Properties
protected
$connection string
The database connection to use.
Default: null
Methods
public
__construct ( ConnectionResolverInterface $db ) : void
Create a new database presence verifier.
Parameters
public
getCount ( $collection , $column , $value , $excludeId , $idColumn , array $extra ) : int
Count the number of objects in a collection having the given value.
Parameters
- $collection string
- $column string
- $value string
- $excludeId int|null
- $idColumn string|null
- $extra array
public
getMultiCount ( $collection , $column , array $values , array $extra ) : int
Count the number of objects in a collection with the given values.
Parameters
- $collection string
- $column string
- $values array
- $extra array
protected
addConditions ( $query , $conditions ) : Builder
Add the given conditions to the query.
Parameters
- $query Builder
- $conditions array
protected
addWhere ( $query , $key , $extraValue ) : void
Add a "where" clause to the given query.
Parameters
- $query Builder
- $key string
- $extraValue string
protected
table ( $table ) : Builder
Get a query builder for the given table.
Parameters
- $table string
public
setConnection ( $connection ) : void
Set the connection to be used.
Parameters
- $connection string