sharp10
(P S10692)
1
Hi guys,
I’m Using Yii 2.0
i’m developing login page and afetr login dashboard is open so i’m using this code to open dashboard
if(isset($result[‘status’]) && $result[‘status’]==0)
{
return $this->actiondashboard();
}
actiondashboard is look like this
function actiondashboard()
{
return $this->render(‘dashboard’)
}
my page is rendered successfully but url is can’t change it is still site/login
help me how to do that
thanks
flarpy
(Peter)
2
To change URL you need to redirect the user, eg
function actiondashboard()
{
return Yii::$app->getResponse()->redirect('/url/to/dashboard');
}
sharp10
(P S10692)
3
it is not working.after i put it shows me " Unable to resolve the request: site/dashboard."
But method is there.and also page is there
SMCapital
(Smaxvikfr)
4
Replace $this->actiondashboard() with redirect,
for example
if(isset($result['status']) && $result['status']==0)
{
$this->redirect('dashboard');
}