Exists (Validation\Rules)

Exists

class Exists (View source)

Methods

void __construct(string $table, string $column = 'NULL')

Create a new exists rule instance.

$this where(string $column, string $value = null)

Set a "where" constraint on the query.

$this whereNot(string $column, string $value)

Set a "where not" constraint on the query.

$this whereNull(string $column)

Set a "where null" constraint on the query.

$this whereNotNull(string $column)

Set a "where not null" constraint on the query.

$this using(Closure $callback)

Register a custom query callback.

array queryCallbacks()

Get the custom query callbacks for the rule.

string __toString()

Convert the rule to a validation string.

Details

void __construct(string $table, string $column = 'NULL')

Create a new exists rule instance.

Parameters

string $table
string $column

Return Value

void

$this where(string $column, string $value = null)

Set a "where" constraint on the query.

Parameters

string $column
string $value

Return Value

$this

$this whereNot(string $column, string $value)

Set a "where not" constraint on the query.

Parameters

string $column
string $value

Return Value

$this

$this whereNull(string $column)

Set a "where null" constraint on the query.

Parameters

string $column

Return Value

$this

$this whereNotNull(string $column)

Set a "where not null" constraint on the query.

Parameters

string $column

Return Value

$this

$this using(Closure $callback)

Register a custom query callback.

Parameters

Closure $callback

Return Value

$this

array queryCallbacks()

Get the custom query callbacks for the rule.

Return Value

array

string __toString()

Convert the rule to a validation string.

Return Value

string

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.3/Illuminate/Validation/Rules/Exists.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部