I'm trying to pass a variable to the view, but am getting the following error:
"Fatal error: Call to a member function setVar() on a non-object in C:...\IndexController.php"
class IndexController extends Phalcon\Mvc\View {
public function indexAction() {
$this->view->setVar('test', 'this is a test'); // This is the line it's complaining about
}
}
Removing this line allows the page to load correctly. What is happening here?