Skip to content

Commit

Permalink
Merge pull request #66 from wikichua/patch-1
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
jenssegers committed Nov 15, 2013
2 parents f2cc050 + c700ade commit d97bd16
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

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
-------------

Expand Down

0 comments on commit d97bd16

Please sign in to comment.