Answer the question
In order to leave comments, you need to log in
How to display multiple GET parameters in YII2 URL?
I am making a site on YII2, there are models of countries and cities, how can I display these countries and cities in the URL line,
for example:
site.com/ - the country is determined by IP - this has already been done using the geolocation component ...
site.com/russia - if the city is not specified
site.com/russia/noscow - if the city is specified
Answer the question
In order to leave comments, you need to log in
It is not entirely clear what the problem is, in the processing of these parameters or in setting their default value?
If in processing - use named parameters
If in setting a default value - implement your own class of URL rules
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question