Documentation

InteractsWithDatabase

Table of Contents

seed()  : $this
Seed a given database connection.
assertDatabaseHas()  : $this
Assert that a given where condition exists in the database.
assertDatabaseMissing()  : $this
Assert that a given where condition does not exist in the database.
assertSoftDeleted()  : $this
Assert the given record has been deleted.
getConnection()  : Connection
Get the database connection.

Methods

seed()

Seed a given database connection.

public seed([string $class = 'DatabaseSeeder' ]) : $this
Parameters
$class : string = 'DatabaseSeeder'
Return values
$this

assertDatabaseHas()

Assert that a given where condition exists in the database.

protected assertDatabaseHas(string $table, array<string|int, mixed> $data[, string $connection = null ]) : $this
Parameters
$table : string
$data : array<string|int, mixed>
$connection : string = null
Return values
$this

assertDatabaseMissing()

Assert that a given where condition does not exist in the database.

protected assertDatabaseMissing(string $table, array<string|int, mixed> $data[, string $connection = null ]) : $this
Parameters
$table : string
$data : array<string|int, mixed>
$connection : string = null
Return values
$this

assertSoftDeleted()

Assert the given record has been deleted.

protected assertSoftDeleted(string $table, array<string|int, mixed> $data[, string $connection = null ]) : $this
Parameters
$table : string
$data : array<string|int, mixed>
$connection : string = null
Return values
$this

Search results