Refactor the database manager.
This commit is contained in:
@@ -22,10 +22,7 @@ class Manager {
|
|||||||
*/
|
*/
|
||||||
public static function connection($connection = null)
|
public static function connection($connection = null)
|
||||||
{
|
{
|
||||||
if (is_null($connection))
|
if (is_null($connection)) $connection = Config::get('db.default');
|
||||||
{
|
|
||||||
$connection = Config::get('db.default');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( ! array_key_exists($connection, static::$connections))
|
if ( ! array_key_exists($connection, static::$connections))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user