Answer the question
In order to leave comments, you need to log in
How to set up routing in yii2 so that it is like in zend framework?
I included prettyUrl for controllers and actions, it works fine as expected
/controller/action and not r=controller/action. ok
, I have a filter where there can be a large number of parameters.
but the engine generates it all for me as
/movie/search?type=all&genre_id=4&quality_id=6&year=2020&rating=[8,10]
I need it to be like in the zend framework by default
/controller/action/:param1/:value1/: param2/:value2
how can such logic be achieved from the router. so that everything that comes after action is perceived as key-value query parameters for all project urls globally.
/movie/search/type/all/genre_id/4/quality_id/6/year/2020/rating/[8,10]
/movie/search/genre_id/4/rating/[8,10]
/movie/search/year/2020/rating/[8,10]
and any of them, apparently, can be omitted
Answer the question
In order to leave comments, you need to log in
How to set up routing in yii2 so that it is like in zend framework?
'afisha/past/default/all' => 'afisha/past/all'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question