Rendering issue

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

To change URL you need to redirect the user, eg




function actiondashboard()

{

return Yii::$app->getResponse()->redirect('/url/to/dashboard');

}



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

Replace $this->actiondashboard() with redirect,

for example


if(isset($result['status']) && $result['status']==0)

{

  $this->redirect('dashboard');

}