Commit d97bd163 authored by Jens Segers's avatar Jens Segers

Merge pull request #66 from wikichua/patch-1

Update README.md
parents f2cc0501 c700adee
...@@ -69,6 +69,26 @@ Tell your model to use the MongoDB model and set the collection (alias for table ...@@ -69,6 +69,26 @@ Tell your model to use the MongoDB model and set the collection (alias for table
Everything else works just like the original Eloquent model. Read more about the Eloquent on http://laravel.com/docs/eloquent Everything else works just like the original Eloquent model. Read more about the Eloquent on http://laravel.com/docs/eloquent
Alternative Eloquent Setting
----------------------------
'aliases' => array(...
'Moloquent' => 'Jenssegers\Mongodb\Model',
);
class MyModel extends Moloquent {
protected $collection = 'mycollection';
}
Add
protected $connection = 'mongodb';
in the MyModel if you have multiple database connections and do not want to overwrite the primary database connection.
Query Builder Query Builder
------------- -------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment