trait
Illuminate
/
Foundation
/
Testing
/
DatabaseTruncation
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.
DatabaseTruncation
Properties
protected
static
$allTables array
The cached names of the database tables for each connection.
Default: null
Methods
protected
truncateDatabaseTables ( ) : void
Truncate the database tables for all configured connections.
protected
truncateTablesForAllConnections ( ) : void
Truncate the database tables for all configured connections.
protected
truncateTablesForConnection ( ConnectionInterface $connection , string $name ) : void
Truncate the database tables for the given database connection.
Parameters
- $connection ConnectionInterface
- $name string|null
protected
connectionsToTruncate ( ) : array
The database connections that should have their tables truncated.
protected
exceptTables ( string $connectionName ) : array
Get the tables that should not be truncated.
Parameters
- $connectionName string|null