S
S
Soo2018-07-10 12:35:26
Yii
Soo, 2018-07-10 12:35:26

Yii2. How to make the correct rendering of pages with a title of several words?

The question is.
my site does not find pages where the title consists of several words, for example:
SiteController

public function actionResetPassword($token)
    {
        return $this->render('resetPassword');
    }

the link /basic/web/index.php?r=site%2FresetPassword gives me an error 404
A view with the name resetPassword is available

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vlad, 2018-07-10
@Soo

CamelCase in YII2 is broken through "-" if I'm not confusing anything.

return $this->redirect(Url::toRoute('reset-password'));

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question