Commit faba8698 authored by Jens Segers's avatar Jens Segers

Merge pull request #460 from NSmithUK/AddMongoClientDriverOptions

Added support for passing driver options to MongoClient (SSL support)
parents 268c3be3 759cbdc7
...@@ -142,7 +142,15 @@ class Connection extends \Illuminate\Database\Connection { ...@@ -142,7 +142,15 @@ class Connection extends \Illuminate\Database\Connection {
$options['password'] = $config['password']; $options['password'] = $config['password'];
} }
return new MongoClient($dsn, $options); // By default driver options is an empty array.
$driverOptions = array();
if (isset($config['driver_options']) && is_array($config['driver_options']))
{
$driverOptions = $config['driver_options'];
}
return new MongoClient($dsn, $options, $driverOptions);
} }
/** /**
......
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