Skip to content

Commit 6391c1c

Browse files
committed
Modified readme
1 parent f510f49 commit 6391c1c

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
phpunit.phar
33
/vendor
44
composer.phar
5-
composer.lock
5+
composer.lock
6+
*.sublime-project
7+
*.sublime-workspace

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Add the service provider in `app/config/app.php`:
2323

2424
'Jenssegers\Mongodb\MongodbServiceProvider',
2525

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

2828
Configuration
2929
-------------
@@ -58,8 +58,8 @@ You can connect to multiple servers or replica sets with the following configura
5858
Eloquent
5959
--------
6060

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+
6363
use Jenssegers\Mongodb\Model as Eloquent;
6464

6565
class MyModel extends Eloquent {
@@ -68,7 +68,7 @@ Tell your model to use the MongoDB model and set the collection (alias for table
6868

6969
}
7070

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.*
7272

7373
Everything else works just like the original Eloquent model. Read more about the Eloquent on http://laravel.com/docs/eloquent
7474

@@ -228,6 +228,8 @@ Supported relations are:
228228

229229
Example:
230230

231+
use Jenssegers\Mongodb\Model as Eloquent;
232+
231233
class User extends Eloquent {
232234

233235
public function items()
@@ -239,6 +241,8 @@ Example:
239241

240242
And the inverse relation:
241243

244+
use Jenssegers\Mongodb\Model as Eloquent;
245+
242246
class Item extends Eloquent {
243247

244248
public function user()

0 commit comments

Comments
 (0)