In Laravel 5.1, we can set the queue connection configurations to 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 databases, 1 default database mysql1in localhost and 1 database mysql2on the remote server, and the Queue table jobsis in the remote database mysql2, how do I configure the queue database driver to use the remote database mysql2? Note that the main application uses the default database in localhost.