H
H
hollanditkzn2017-03-20 13:27:18
Yii
hollanditkzn, 2017-03-20 13:27:18

How to make a transition to the backend?

I can’t figure out how to make it so that during authorization the user gets into the backend in the admin panel. It is necessary for me that in the controler to make redirect at successful authorization. I searched on the Internet did not find suitable information

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Fedorov, 2017-03-20
@qonand

first, in the config, you need to connect an additional URL manager referring to the back-end, for example:

'urlManagerBackend' => [
    'class' => 'yii\web\urlManager',
    'enablePrettyUrl' => true,
    'showScriptName' => false,
    'baseUrl' => $backEndUrl,
],

after which, when redirecting, just use it, for example:
But as if the frontend is the user part of the site, the backend is the admin part. And for each part of the site it is better to do your own authorization

S
sisn, 2017-03-20
@sisn

Start by learning the correct terminology.
The user of the site can NOT get into the backend in any way.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question