-1

2 accounts and 2 database and 1 dominio

User A logs in and is linked to database A. User B logs in and is linked to database B.

Is it possible? if yes, how?

Is it possible to handle multiple databases in Laravel env file?

If yes how?

Thank you

Morex
  • 9
  • 3
  • Might be helpful: https://stackoverflow.com/questions/31847054/how-to-use-multiple-databases-in-laravel and https://stackoverflow.com/questions/51074804/connect-multiple-databases-dynamically-in-laravel – OMi Shah Aug 26 '23 at 09:27
  • Use laravel tennancy package, if applicable. But looks like applicable. – Maksim Aug 26 '23 at 09:41
  • yes it is possible make another Users2 model and set connection as ``protected $connection= 'second_db_connection';`` and in guards set providers to Users2 model then use the guards to authenticate – Sumit kumar Aug 26 '23 at 09:57
  • and in file ENV ? – Morex Aug 26 '23 at 13:13

0 Answers0