public function logout()
    {
        $this->hook('logout');

        $this->model->unload();

        // maybe can use $this->app->destroySession() here instead?
        $this->forget('info');
        $this->forget('id');

        setcookie(session_name(), '', time() - 42000, '/');
        if (session_status() === PHP_SESSION_ACTIVE) {
            session_destroy();
        }

        $this->info = false;

        return $this;
    }
public function logout()
    {
        $this->hook('logout');

        $this->model->unload();

        // maybe can use $this->app->destroySession() here instead?
        $this->forget('info');
        $this->forget('id');

        setcookie(session_name(), '', time() - 42000, '/');
        if (session_status() === PHP_SESSION_ACTIVE) {
            session_destroy();
        }

        $this->info = false;

        return $this;
    }
public function logout ( ) { $ this -> hook ( 'logout' ) ; $ this -> model -> unload ( ) ; // maybe can use $this->app->destroySession() here instead? $ this -> forget ( 'info' ) ; $ this -> forget ( 'id' ) ; setcookie ( session_name ( ) , '' , time ( ) - 42000 , '/' ) ; if ( session_status ( ) === PHP_SESSION_ACTIVE ) { session_destroy ( ) ; } $ this -> info = false ; return $ this ; }
Manually log out user.

@return $this
Manually log out user .