You can define multiple database connections and use them on your queries, see: https://laravel.com/docs/8.x/database#using-multiple-database-connections
It is also possible to use them with your eloquent models. See: https://laravel.com/docs/8.x/eloquent#database-connections
Does that help you?
kevinb1989 liked this reply
When using multiple connections, you may access each connection via the connection method on the DB facade. The name passed to the connection method should correspond to one of the connections listed in your config/database.php configuration.
Check out these helpful links:
http://fideloper.com/laravel-multiple-database-connections ..... https://laracasts.com/discuss/channels/general-discussion/hitting-multiple-databases-dinamically-with-laravel?page=1 ...... https://laravel.com/docs/5.4/database#using-multiple-database-connections
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community