B
B
beta-it2016-11-16 09:02:32
Yii
beta-it, 2016-11-16 09:02:32

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

1 answer(s)
M
Maxim Fedorov, 2016-11-16
@beta-it

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 question

Ask a Question

731 491 924 answers to any question