mirror of
https://github.com/laravel/laravel.git
synced 2025-02-20 11:53:14 +08:00
Added "driver" method to System\DB.
This commit is contained in:
parent
0f8f3f347c
commit
2f7fa6687c
@ -94,4 +94,15 @@ class DB {
|
||||
return new DB\Query($table, $connection);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the driver name for a database connection.
|
||||
*
|
||||
* @param string $connection
|
||||
* @return string
|
||||
*/
|
||||
public static function driver($connection = null)
|
||||
{
|
||||
return static::connection($connection)->getAttribute(\PDO::ATTR_DRIVER_NAME);
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user