You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ Add the service provider in `app/config/app.php`:
23
23
24
24
'Jenssegers\Mongodb\MongodbServiceProvider',
25
25
26
-
The service provider will register a mongodb extension with the original database manager, so that everything else keeps working just fine.
26
+
The service provider will register a mongodb database extension with the original database manager. There is no need to register additional facades or objects. When using mongodb connections, Laravel will automatically provide you with the corresponding mongodb objects.
27
27
28
28
Configuration
29
29
-------------
@@ -58,8 +58,8 @@ You can connect to multiple servers or replica sets with the following configura
58
58
Eloquent
59
59
--------
60
60
61
-
Tell your model to use the MongoDB model and set the collection (alias for table) property:
62
-
61
+
Tell your model to use the MongoDB model and set the collection (alias for table) property. The lower-case, plural name of the class will be used for the collection name, unless another name is explicitly specified.
62
+
63
63
use Jenssegers\Mongodb\Model as Eloquent;
64
64
65
65
class MyModel extends Eloquent {
@@ -68,7 +68,7 @@ Tell your model to use the MongoDB model and set the collection (alias for table
68
68
69
69
}
70
70
71
-
*You can also specify the connection name in the model by changing the `connection`attribute.*
71
+
*You can also specify the connection name in the model by changing the `connection`property.*
72
72
73
73
Everything else works just like the original Eloquent model. Read more about the Eloquent on http://laravel.com/docs/eloquent
0 commit comments