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
ef147ea5
Unverified
Commit
ef147ea5
authored
Feb 05, 2020
by
Stas
Committed by
GitHub
Feb 05, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1941 from divine/pr_1476
[Updated PR#1476] Add explanation for database migration resets
parents
c55d42de
0bbb4045
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
README.md
README.md
+20
-0
No files found.
README.md
View file @
ef147ea5
...
@@ -16,6 +16,7 @@ This package adds functionalities to the Eloquent model and Query builder for Mo
...
@@ -16,6 +16,7 @@ This package adds functionalities to the Eloquent model and Query builder for Mo
-
[
Lumen
](
#lumen
)
-
[
Lumen
](
#lumen
)
-
[
Non-Laravel projects
](
#non-laravel-projects
)
-
[
Non-Laravel projects
](
#non-laravel-projects
)
-
[
Testing
](
#testing
)
-
[
Testing
](
#testing
)
-
[
Database Testing
](
#database-testing
)
-
[
Configuration
](
#configuration
)
-
[
Configuration
](
#configuration
)
-
[
Eloquent
](
#eloquent
)
-
[
Eloquent
](
#eloquent
)
-
[
Extending the base model
](
#extending-the-base-model
)
-
[
Extending the base model
](
#extending-the-base-model
)
...
@@ -113,6 +114,25 @@ To run the test for this package, run:
...
@@ -113,6 +114,25 @@ To run the test for this package, run:
docker-compose up
docker-compose up
```
```
Database Testing
-------
To reset the database after each test, add:
```
php
use
Illuminate\Foundation\Testing\DatabaseMigrations
;
```
Also inside each test classes, add:
```
php
use
DatabaseMigrations
;
```
Keep in mind that these traits are not yet supported:
-
`use Database Transactions;`
-
`use RefreshDatabase;`
Configuration
Configuration
-------------
-------------
You can use MongoDB either as the main database, either as a side database. To do so, add a new
`mongodb`
connection to
`config/database.php`
:
You can use MongoDB either as the main database, either as a side database. To do so, add a new
`mongodb`
connection to
`config/database.php`
:
...
...
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