Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
laravel-mongodb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sinan
laravel-mongodb
Commits
58bb1b5f
Commit
58bb1b5f
authored
Jan 25, 2016
by
Jens Segers
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #697 from luizpedone/luizpedone-patch-1
Use short array syntax notation.
parents
69ce11ee
561448cd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
README.md
README.md
+8
-7
No files found.
README.md
View file @
58bb1b5f
...
...
@@ -39,26 +39,27 @@ Change your default database connection name in `app/config/database.php`:
And add a new mongodb connection:
'mongodb' =>
array(
'mongodb' =>
[
'driver' => 'mongodb',
'host' => 'localhost',
'port' => 27017,
'username' => 'username',
'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:
'mongodb' =>
array(
'mongodb' =>
[
'driver' => 'mongodb',
'host' =>
array('server1', 'server2')
,
'host' =>
['server1', 'server2']
,
'port' => 27017,
'username' => 'username',
'password' => 'password',
'database' => 'database',
'options' =>
array('replicaSet' => 'replicaSetName')
)
,
'options' =>
['replicaSet' => 'replicaSetName']
]
,
Eloquent
--------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment