Support the ongoing development of Laravel.io →
Laravel Database
Last updated 1 year ago.
0
moderator

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

1

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/hitt... ...... https://laravel.com/docs/5.4/database#using-multiple-database-...

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Chetna chetnachandra Joined 22 Mar 2021

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.