Answer the question
In order to leave comments, you need to log in
How to make region selection on a separate Laravel subdomain?
It is necessary to make a choice of a region subdomain on the laravel framework.
Example
moscow.site.ru/
spb.site.ru/
Depending on the selected region, the following data is pulled from the database (for example) City name, phone number, etc.
Which way to look?
Answer the question
In order to leave comments, you need to log in
Somewhere in the route provider, you assign a subdomain to all web routes and in the view composer you pull the data in accordance with the domain. Do not forget to also remove this parameter from the request with the help of middleware.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question