Answer the question
In order to leave comments, you need to log in
Yii2 how to competently implement a site with several cities?
Help, please, to make the implementation of the choice of cities on the site. It is necessary to make it so that the user can select a city and only the records of the selected city are shown to him. Cities are located in the database in the table 'city' and have columns 'id', 'name', 'url'
When choosing from the drop-down list, we get the selected city and substitute it in Url. It turns out something like this
www/site.ru/moscow/post/
www/site.ru/spb/post/
www/site.ru/moscow/user/
Answer the question
In order to leave comments, you need to log in
There was a question a week ago. google it.
+ this article to help you - https://habrahabr.ru/post/226931/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question