L5.2 - How to use differente DB connection for Queue
Hi all
I’d like to use an SQLite DB for Queue, then:
- I set my SQLite connection in the
config/databases.php file
- I run
php artisan migrate --database=sqlite to create Job table in the SQLite DB
but now, what I’ve to set in the Listener to use this DataBase? In a Model, for example, I set $connection=sqlite but in the Listener?
Thank you.
I've solved by adding the connection key:
'database' => [
'driver' => 'database',
'connection' => 'sqlite',
'table' => 'jobs',
'queue' => 'default',
'expire' => 60,
],
Please or to participate in this conversation.