M
M
max32772019-04-04 15:21:24
Laravel
max3277, 2019-04-04 15:21:24

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

1 answer(s)
A
Alex Wells, 2019-04-05
@Alex_Wells

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 question

Ask a Question

731 491 924 answers to any question