Skip to content
Discussion options

You must be logged in to vote

Yes, it is possible to use a custom database connection other than the default connection when using the database driver for Scout in Laravel.

Laravel Scout is a full-text search package that integrates with popular search engines like Algolia and Elasticsearch. By default, Scout uses the same database connection as your application, which is defined in the config/database.php file.

To use a custom database connection specifically for Scout, you can follow these steps:

Define the custom connection in the config/database.php file. For example, you can add a new connection configuration under the connections array:
php
Copy code
'connections' => [
'scout' => [
'driver' => 'mysql',
'host' =>…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by nick-nds
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants