Exists
class Exists (View source)
Traits
Properties
protected string | $table | The table to run the query against. | from DatabaseRule |
protected string | $column | The column to check on. | from DatabaseRule |
protected array | $wheres | The extra where clauses for the query. | from DatabaseRule |
protected array | $using | The array of custom query callbacks. | from DatabaseRule |
Methods
void
__construct(string $table, string $column = 'NULL')
Create a new rule instance.
from DatabaseRule
$this
where(string|Closure $column, array|string|null $value = null)
Set a "where" constraint on the query.
from DatabaseRule
$this
whereNot(string $column, array|string $value)
Set a "where not" constraint on the query.
from DatabaseRule
$this
whereNotNull(string $column)
Set a "where not null" constraint on the query.
from DatabaseRule
$this
whereIn(string $column, array $values)
Set a "where in" constraint on the query.
from DatabaseRule
$this
whereNotIn(string $column, array $values)
Set a "where not in" constraint on the query.
from DatabaseRule
string
__toString()
Convert the rule to a validation string.
Details
in DatabaseRule at line 44
void
__construct(string $table, string $column = 'NULL')
Create a new rule instance.
in DatabaseRule at line 57
$this
where(string|Closure $column, array|string|null $value = null)
Set a "where" constraint on the query.
in DatabaseRule at line 79
$this
whereNot(string $column, array|string $value)
Set a "where not" constraint on the query.
in DatabaseRule at line 94
$this
whereNull(string $column)
Set a "where null" constraint on the query.
in DatabaseRule at line 105
$this
whereNotNull(string $column)
Set a "where not null" constraint on the query.
in DatabaseRule at line 117
$this
whereIn(string $column, array $values)
Set a "where in" constraint on the query.
in DatabaseRule at line 131
$this
whereNotIn(string $column, array $values)
Set a "where not in" constraint on the query.
in DatabaseRule at line 144
$this
using(Closure $callback)
Register a custom query callback.
in DatabaseRule at line 156
array
queryCallbacks()
Get the custom query callbacks for the rule.
in DatabaseRule at line 166
protected string
formatWheres()
Format the where clauses.
at line 14
string
__toString()
Convert the rule to a validation string.