In Laravel 5.1, we can set the Queue connection configurations in config/queue.php
.
QUEUE_DRIVER=database
'database' => [
'driver' => 'database',
'table' => 'jobs',
'queue' => 'default',
'expire' => 60,
],
However, it will only use the default database connection in config/database.php
.
If I have 2 database, 1 default database mysql1
in localhost, and 1 database mysql2
in a remote server, and the Queue jobs
table is in the remote database mysql2
, how can I configure the Queue database driver to use the remote mysql2
database? Please note that the main App is using the default database in localhost.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire