V
V
Valeriy Donika2015-02-01 18:57:28
Yii
Valeriy Donika, 2015-02-01 18:57:28

YII2 urlmanager between frontend and backend?

A few questions.
Just installed the framework, did not do any manipulations except urlmanager

'urlManager' => [
            'rules' => [
                '<controller>/<action>' => '<controller>/<action>',
            ]
        ],

1) How to add a link to the NavBar::begin([ in the main layer from the front to the backend ['label' => 'Admin', 'url' => here is a link to the backend.
2) In the same layer in the menu there is such a thing 'brandUrl' => Yii::$app->homeUrl, It leads to yiiadvance.lc/frontend/web or yiiadvance.lc/bakcned/web which in turn returns 404. But the button in the Home menu leads to frontend/web /site/index/ and the same for backing. How to fix it? Prescribe home url in config?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Lavrentiev, 2015-02-01
@lavrentiev

you can have your own config for each application, for example, I do this. And in each application I already configure urlManager.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question