We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Call to undefined method setVar

Hello, i'm new to Phalcon and im stuck at this point of tutorial,

class LoginController extends \Phalcon\Mvc\Controller
    public function indexAction()
        echo "Login";

    // /login/proces/<username/<age>
    public function processAction($username = false, $age = 12)
        $this->setVar('username', $username);
        $this->setVar('age', $age);

and get this error:

Fatal error: Call to undefined method LoginController::setVar() in C:\xampp\htdocs\phalcon\app\controllers\LoginController.php on line 14

no, I am blind,

thank you now works fine