Commit 2f7fa668 authored by Taylor Otwell's avatar Taylor Otwell

Added "driver" method to System\DB.

parent 0f8f3f34
...@@ -94,4 +94,15 @@ class DB { ...@@ -94,4 +94,15 @@ class DB {
return new DB\Query($table, $connection); 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);
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment