Mohammed Said shows a great way on how to handle db connections in a multi tenancy Laravel app.

The majority of applications just communicate with a single database. However, a considerable portion of laravel applications communicates with multiple databases. There are some neat packages that help with managing multiple connections, but it'd be useful if we understand how database connections work in Laravel, so let's dive in.

https://divinglaravel.com/understanding-how-laravel-configures-database-connections