Spec-Zone.ru › Laravel 5.4

InteractsWithDatabase

trait InteractsWithDatabase (View source)

Методы

$this assertDatabaseHas(string $table, array $data, string $connection = null)

Утверждение, что заданное условие where существует в базе данных.

$this assertDatabaseMissing(string $table, array $data, string $connection = null)

Утверждение, что заданное условие where не существует в базе данных.

$this assertSoftDeleted(string $table, array $data, string $connection = null)

Утверждение, что данный запис удалён.

Connection getConnection(string|null $connection = null)

Получение соединения с базой данных.

$this seed(string $class = 'DatabaseSeeder')

Запуск посева для заданного соединения с базой данных.

Подробности

protected $this assertDatabaseHas(string $table, array $data, string $connection = null)

Утверждение, что заданное условие where существует в базе данных.

Параметры

string $table
array $data
string $connection

Возвращаемое значение

$this

protected $this assertDatabaseMissing(string $table, array $data, string $connection = null)

Утверждение, что заданное условие where не существует в базе данных.

Параметры

string $table
array $data
string $connection

Возвращаемое значение

$this

protected $this assertSoftDeleted(string $table, array $data, string $connection = null)

Утверждение, что данный запис удалён.

Параметры

string $table
array $data
string $connection

Возвращаемое значение

$this

protected Connection getConnection(string|null $connection = null)

Получение соединения с базой данных.

Параметры

string|null $connection

Возвращаемое значение

Connection

$this seed(string $class = 'DatabaseSeeder')

Запуск посева для заданного соединения с базой данных.

Параметры

string $class

Возвращаемое значение

$this

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.4/Illuminate/Foundation/Testing/Concerns/InteractsWithDatabase.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API