@@ -42,6 +42,8 @@ This package adds functionalities to the Eloquent model and Query builder for Mo
4242 - [ Cross-Database Relationships] ( #cross-database-relationships )
4343 - [ Authentication] ( #authentication )
4444 - [ Queues] ( #queues )
45+ - [ Laravel specific] ( #laravel-specific )
46+ - [ Lumen specific] ( #Lumen-specific )
4547 - [ Upgrading] ( #upgrading )
4648 - [ Upgrading from version 2 to 3] ( #upgrading-from-version-2-to-3 )
4749
@@ -1067,6 +1069,8 @@ If you want to use MongoDB as your database backend, change the driver in `confi
10671069'connections' => [
10681070 'database' => [
10691071 'driver' => 'mongodb',
1072+ // You can also specify your jobs specific database created on config/database.php
1073+ 'connection' => 'mongodb-job',
10701074 'table' => 'jobs',
10711075 'queue' => 'default',
10721076 'expire' => 60,
@@ -1078,23 +1082,31 @@ If you want to use MongoDB to handle failed jobs, change the database in `config
10781082
10791083``` php
10801084'failed' => [
1081- 'driver' => env('QUEUE_FAILED_DRIVER', 'database'),
1082- 'database' => env('DB_CONNECTION', 'mongodb'),
1085+ 'driver' => 'mongodb',
1086+ // You can also specify your jobs specific database created on config/database.php
1087+ 'database' => 'mongodb-job',
10831088 'table' => 'failed_jobs',
10841089],
10851090```
10861091
1087- Or simply set your own ` QUEUE_FAILED_DRIVER ` environment variable to ` mongodb `
1088- ``` env
1089- QUEUE_FAILED_DRIVER=mongodb
1090- ```
1092+ #### Laravel specific
10911093
1092- Last, add the service provider in ` config/app.php ` :
1094+ Add the service provider in ` config/app.php ` :
10931095
10941096``` php
10951097Jenssegers\Mongodb\MongodbQueueServiceProvider::class,
10961098```
10971099
1100+ #### Lumen specific
1101+
1102+ With [ Lumen] ( http://lumen.laravel.com ) , add the service provider in ` bootstrap/app.php ` . You must however ensure that you add the following ** after** the ` MongodbServiceProvider ` registration.
1103+
1104+ ``` php
1105+ $app->make('queue');
1106+
1107+ $app->register(Jenssegers\Mongodb\MongodbQueueServiceProvider::class);
1108+ ```
1109+
10981110Upgrading
10991111---------
11001112
0 commit comments