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
00d3b8b0
Commit
00d3b8b0
authored
Aug 20, 2015
by
Jens Segers
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #564 from nerijunior/master
DB Connection example updated to use env
parents
4249c5ed
dffd3482
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
README.md
README.md
+9
-9
No files found.
README.md
View file @
00d3b8b0
...
...
@@ -79,11 +79,11 @@ And add a new mongodb connection:
```
php
'mongodb'
=>
array
(
'driver'
=>
'mongodb'
,
'host'
=>
'localhost'
,
'port'
=>
27017
,
'
username'
=>
'username'
,
'
password'
=>
'password'
,
'
database'
=>
'database'
,
'host'
=>
env
(
'DB_HOST'
,
'localhost'
)
,
'port'
=>
env
(
'DB_PORT'
,
27017
)
,
'
database'
=>
env
(
'DB_DATABASE'
,
''
)
,
'
username'
=>
env
(
'DB_USERNAME'
,
''
)
,
'
password'
=>
env
(
'DB_PASSWORD'
,
''
)
,
'options'
=>
array
(
'db'
=>
'admin'
// sets the authentication database required by mongo 3
)
...
...
@@ -96,10 +96,10 @@ You can connect to multiple servers or replica sets with the following configura
'mongodb'
=>
array
(
'driver'
=>
'mongodb'
,
'host'
=>
array
(
'server1'
,
'server2'
),
'port'
=>
27017
,
'
username'
=>
'username'
,
'
password'
=>
'password'
,
'
database'
=>
'database'
,
'port'
=>
env
(
'DB_PORT'
,
27017
)
,
'
database'
=>
env
(
'DB_DATABASE'
,
''
)
,
'
username'
=>
env
(
'DB_USERNAME'
,
''
)
,
'
password'
=>
env
(
'DB_PASSWORD'
,
''
)
,
'options'
=>
array
(
'replicaSet'
=>
'replicaSetName'
)
),
```
...
...
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