InteractsWithDatabase
trait InteractsWithDatabase (View source)
Methods
$this
assertDatabaseHas(string $table, array $data, string|null $connection = null)
Assert that a given where condition exists in the database.
$this
assertDatabaseMissing(string $table, array $data, string|null $connection = null)
Assert that a given where condition does not exist in the database.
$this
assertSoftDeleted(string|Model $table, array $data = [], string|null $connection = null)
Assert the given record has been deleted.
getConnection(string|null $connection = null)
Get the database connection.
$this
seed(array|string $class = 'DatabaseSeeder')
Seed a given database connection.
Details
protected $this
assertDatabaseHas(string $table, array $data, string|null $connection = null)
Assert that a given where condition exists in the database.
protected $this
assertDatabaseMissing(string $table, array $data, string|null $connection = null)
Assert that a given where condition does not exist in the database.
protected $this
assertSoftDeleted(string|Model $table, array $data = [], string|null $connection = null)
Assert the given record has been deleted.
protected Connection
getConnection(string|null $connection = null)
Get the database connection.
$this
seed(array|string $class = 'DatabaseSeeder')
Seed a given database connection.