Answer the question
In order to leave comments, you need to log in
Yii2 region selection (region) how to solve this?
Good afternoon.
The structure is
Table City
--------
city_id
city_name
slug
default
-------
Shop
------
shop_id
shop_name
slug
city_id
------
Product
-------
product_id
slug
name
city_id
image
shop_id
status
category_id
description
user_id
---------
What we would like, select the region on the main page and then all the urls site.com/odessa/shop/adidas
site.com/odessa/shoes/ecco
Etc. I understand that this is something like multilingualism, I looked at examples of multilingualism, there are all sorts of Yii::$app->language , and I have one language, I'm generally confused.
Please advise if anyone has experience with this issue :)
Answer the question
In order to leave comments, you need to log in
In your case, there is no multilingualism, make the rule in the route and the method in the controller.
show method in Shop controller
public function actionShow($region, $brend){
//...
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question