public function redirect($default = 'home')
    {
        $redirect = $this->getController()->plugin('redirect');
        $route = $this->getSession()->route;
        if (null === $route) {
            return $redirect->toRoute($default);
        }
        return $redirect->toRoute($route->getMatchedRouteName(), 
            $route->getParams());
    }
public function redirect($default = 'home')
    {
        $redirect = $this->getController()->plugin('redirect');
        $route = $this->getSession()->route;
        if (null === $route) {
            return $redirect->toRoute($default);
        }
        return $redirect->toRoute($route->getMatchedRouteName(), 
            $route->getParams());
    }
public function redirect ( $ default = 'home' ) { $ redirect = $ this -> getController ( ) -> plugin ( 'redirect' ) ; $ route = $ this -> getSession ( ) -> route ; if ( null === $ route ) { return $ redirect -> toRoute ( $ default ) ; } return $ redirect -> toRoute ( $ route -> getMatchedRouteName ( ) , $ route -> getParams ( ) ) ; }
Redirect to last route

@param string $default
Default route to use if previous route not found
Redirect to last route