#development #laravel #php

When using Laravel Scout for doing full-text search indexing, you might want to use a separate queue for the indexing.

To do so, edit config/scout.php and change the key queue from (document here):

1return [
2    // ...
3
4    'queue' => true,
5
6    // ...
7];

to:

 1return [
 2    // ...
 3
 4    'queue' => [
 5        'connection' => null,
 6        'queue' => env('SCOUT_QUEUE_NAME', 'default'),
 7    ],
 8
 9    // ...
10];

The connection will default to default if it contains a null value, the queue will be taken from the environment variables and defaults to default.

All you then need to do is to specify the name of the queue you want to use using an environment variable:

1SCOUT_QUEUE_NAME=my-scout-queue