Commit 6c020a63 authored by Philip Brown's avatar Philip Brown Committed by Jens Segers

Remove the database from the dsn. (#971)

See https://github.com/mongodb/mongo-php-library/issues/171
parent fecc60cb
...@@ -185,7 +185,7 @@ class Connection extends \Illuminate\Database\Connection ...@@ -185,7 +185,7 @@ class Connection extends \Illuminate\Database\Connection
} }
} }
return "mongodb://" . implode(',', $hosts) . "/{$database}"; return "mongodb://" . implode(',', $hosts) . ($database? "/{$database}" : '');
} }
/** /**
......
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