public function actionLogout()
    {
        Yii::$app->user->logout();

        // handle redirect
        $logoutRedirect = $this->module->logoutRedirect;
        if ($logoutRedirect) {
            return $this->redirect($logoutRedirect);
        }
        return $this->goHome();
    }
public function actionLogout()
    {
        Yii::$app->user->logout();

        // handle redirect
        $logoutRedirect = $this->module->logoutRedirect;
        if ($logoutRedirect) {
            return $this->redirect($logoutRedirect);
        }
        return $this->goHome();
    }
public function actionLogout ( ) { Yii :: $ app -> user -> logout ( ) ; // handle redirect $ logoutRedirect = $ this -> module -> logoutRedirect ; if ( $ logoutRedirect ) { return $ this -> redirect ( $ logoutRedirect ) ; } return $ this -> goHome ( ) ; }
Log user out and redirect
Log user out and redirect