trait ConnectsToDatabase (View source)

Methods

connect(array $params, string|null $username = null, string|null $password = null, array $driverOptions = [])

Create a new database connection.

Details

Connection connect(array $params, string|null $username = null, string|null $password = null, array $driverOptions = [])

Create a new database connection.

Parameters

array $params
string|null $username
string|null $password
array $driverOptions

Return Value

Connection

Exceptions

InvalidArgumentException