We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f2cc050 + c700ade commit d97bd16Copy full SHA for d97bd16
README.md
@@ -69,6 +69,26 @@ Tell your model to use the MongoDB model and set the collection (alias for table
69
70
Everything else works just like the original Eloquent model. Read more about the Eloquent on http://laravel.com/docs/eloquent
71
72
+Alternative Eloquent Setting
73
+----------------------------
74
+
75
+ 'aliases' => array(...
76
+ 'Moloquent' => 'Jenssegers\Mongodb\Model',
77
+ );
78
79
+ class MyModel extends Moloquent {
80
81
+ protected $collection = 'mycollection';
82
83
+ }
84
85
+ Add
86
87
+ protected $connection = 'mongodb';
88
89
+ in the MyModel if you have multiple database connections and do not want to overwrite the primary database connection.
90
91
92
Query Builder
93
-------------
94
0 commit comments