Answer the question
In order to leave comments, you need to log in
How to make pretty links in create/delete/edit commands in yii2?
Hello!
When navigating through the pages of the site using .htaccess and enablePrettyUrl, beautiful links of the type are configured http://backend.site.loc/catalog
, but when you click on the post editing buttons, they continue to be displayed as http://backend.alf.loc/catalog/update?id=1
. My question is, is this the norm or would it be more correct like this http://backend.alf.loc/catalog/update/1
?
Answer the question
In order to leave comments, you need to log in
The kind of links backend.alf.loc/catalog/update/1 are more convenient for the end user. In yii2, you can bring links to any desired form using UrlRule, you can read more about this here https://github.com/yiisoft/yii2/blob/master/docs/g...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question