2
I am creating an application that, when the customer is creating the structure of his store, he will get a subdomain (which he will choose himself) and the database that Laravel will search for will have the name of the subdomain. EX:
- client closes the contract;
- within a Wizzard, he selects that his subdomain will be foo;
- then I will create the bank with the same subdomain foo.myapp.;
- From this, Laravel must find such a bank for such a domain
Is there any way I can define the access bank based on the subdomain?
I made it very short buddy. It’s late! ;)
– Wallace Maxters
Hello, take a look at this link (English), if I understand your problem well it will help you to create this dynamism without having to create a model whenever a customer arises. https://lukevers.com/2015/03/25/on-the-fly-database-connections-with-laravel-5/
– Raylan Soares