1
So, I need to create an application with Laravel 5 where it is possible for different users to be authenticated in a specific database where the system is.
After logging in, each user can change information within the system, and this information should be on another server, another database. Each user will change information in a different database.
My idea is that when the user is authenticated, it is already defined what is his database, the database that is linked to his login, so that he can change what he wants. The application must know which database to change according to the user who is logged in.
I don’t know if I could explain it properly, but in short, the application will only be a bridge that will connect each user to their database, and the login of all should be centralized in a database "main".
Can someone give me a light on how to do this? Is there a "package" I can use?
NOTE: I cannot keep creating several connections in config/database.php.
The information for connection will be in the database of the main application, linked to the registration of the user that will be authenticated. This has to be dynamic, check the host information and etc when the user logs in and already makes the connection to his database.