Skip to content

Commit e6ad623

Browse files
committed
Move capsule documentation to installation
1 parent d6f0113 commit e6ad623

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@ Add the service provider in `app/config/app.php`:
4242

4343
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.
4444

45+
For usage outside Laravel, check out the [Capsule manager](https://github.com/illuminate/database/blob/master/README.md) and add:
46+
47+
```php
48+
$capsule->getDatabaseManager()->extend('mongodb', function($config)
49+
{
50+
return new Jenssegers\Mongodb\Connection($config);
51+
});
52+
```
53+
4554
Configuration
4655
-------------
4756

@@ -78,15 +87,6 @@ You can connect to multiple servers or replica sets with the following configura
7887
),
7988
```
8089

81-
For usage outside Laravel, check out the [Capsule manager](https://github.com/illuminate/database/blob/master/README.md) and add:
82-
83-
```php
84-
$capsule->getDatabaseManager()->extend('mongodb', function($config)
85-
{
86-
return new Jenssegers\Mongodb\Connection($config);
87-
});
88-
```
89-
9090
Eloquent
9191
--------
9292

0 commit comments

Comments
 (0)