How to create a rule in urlManager in Yii 2?

Good time of day.
A controller ItemController action view which has a parameter (variable slug)
To get data from the database you are querying site/item/view?slug=alias
How to make a rule of the form site/about which will query the site/item/view?slug=about?
June 8th 19 at 16:58
1 answer
June 8th 19 at 17:00
to add rules to a rule
'/<slug:\w+>' => 'item/view'</slug:\w+>

Find more questions by tags Yii