Commit 58bb1b5f authored by Jens Segers's avatar Jens Segers

Merge pull request #697 from luizpedone/luizpedone-patch-1

Use short array syntax notation.
parents 69ce11ee 561448cd
...@@ -39,26 +39,27 @@ Change your default database connection name in `app/config/database.php`: ...@@ -39,26 +39,27 @@ Change your default database connection name in `app/config/database.php`:
And add a new mongodb connection: And add a new mongodb connection:
'mongodb' => array( 'mongodb' => [
'driver' => 'mongodb', 'driver' => 'mongodb',
'host' => 'localhost', 'host' => 'localhost',
'port' => 27017, 'port' => 27017,
'username' => 'username', 'username' => 'username',
'password' => 'password', 'password' => 'password',
'database' => 'database' 'database' => 'database',
), 'options' => ['db' => 'admin'] // Required to authenticate on MongoDB 3.0 or higher
],
You can connect to multiple servers or replica sets with the following configuration: You can connect to multiple servers or replica sets with the following configuration:
'mongodb' => array( 'mongodb' => [
'driver' => 'mongodb', 'driver' => 'mongodb',
'host' => array('server1', 'server2'), 'host' => ['server1', 'server2'],
'port' => 27017, 'port' => 27017,
'username' => 'username', 'username' => 'username',
'password' => 'password', 'password' => 'password',
'database' => 'database', 'database' => 'database',
'options' => array('replicaSet' => 'replicaSetName') 'options' => ['replicaSet' => 'replicaSetName']
), ],
Eloquent Eloquent
-------- --------
......
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