Establish Database Type
DB::DBAL is designed to allow connections to multiple database types, and multiple databases within each type. To start, we’ll use the DB class, followed by double colons and the name of the type of database you want to connect to (identical to the name of the database extension).
A sample MySQL connection would look like this:
1 |
DB::MySQL() |
And a MSSQL connection:
1 |
DB::MSSQL() |
Firebird:
1 |
DB::Firebird() |
Supported Databases:
The following databases are currently built into DB::DBAL
- MySQL
- Firebird