H
H
Hy_ok2016-12-09 11:10:04
Yii
Hy_ok, 2016-12-09 11:10:04

How to put hyphen in url in yii2 instead of underscore?

How to put hyphen in url in yii2 instead of underscore? it's just that if you shove a hyphen into the name of the controller, then there will be an error, since the hyphen is a subtraction operation, I know that people change like that underscore to hyphens in the url on yii2, tell me how please?)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Fedorov, 2016-12-09
@hy_ok

write the name of the controller in CamelCase style and it will be automatically converted with hyphens, for example:
MyFirstController will be converted to url my-first

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question