DatabaseRule
trait DatabaseRule (View source)
Свойства
| protected string | $table | Таблица для выполнения запроса. | |
| protected string | $column | Столбец для проверки. | |
| protected array | $wheres | Дополнительные условия WHERE для запроса. | |
| protected array | $using | Массив пользовательских функций для запроса. |
Методы
| void | __construct(string $table, string $column = 'NULL') Создать новый экземпляр правила. | |
| $this | where(string|Closure $column, array|string|null $value = null) Установить условие "where" для запроса. | |
| $this | whereNot(string $column, array|string $value) Установить условие "where not" для запроса. | |
| $this | whereNull(string $column) Установить условие "where null" для запроса. | |
| $this | whereNotNull(string $column) Установить условие "where not null" для запроса. | |
| $this | whereIn(string $column, array $values) Установить условие "where in" для запроса. | |
| $this | whereNotIn(string $column, array $values) Установить условие "where not in" для запроса. | |
| $this | using(Closure $callback) Зарегистрировать пользовательскую функцию для запроса. | |
| array | queryCallbacks() Получить пользовательские функции для запроса. | |
| string | formatWheres() Форматировать условия WHERE. |
Подробности
void __construct(string $table, string $column = 'NULL')
Создать новый экземпляр правила.
$this where(string|Closure $column, array|string|null $value = null)
Установить условие "where" для запроса.
$this whereNot(string $column, array|string $value)
Установить условие "where not" для запроса.
$this whereNull(string $column)
Установить условие "where null" для запроса.
$this whereNotNull(string $column)
Установить условие "where not null" для запроса.
$this whereIn(string $column, array $values)
Установить условие "where in" для запроса.
$this whereNotIn(string $column, array $values)
Установить условие "where not in" для запроса.
$this using(Closure $callback)
Зарегистрировать пользовательскую функцию для запроса.
array queryCallbacks()
Получить пользовательские функции для запроса.
protected string formatWheres()
Форматировать условия WHERE.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.5/Illuminate/Validation/Rules/DatabaseRule.html