Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

I can't create controller in INVO

Hello. I'm trying to improve the demo website INVO of the tutorial 2. I tried to create a new controller called AlarmController.php. The view is 'index.volt' in the Folder 'alarm'. The result is nothing. I already set it in the SecurityPlugin. Anyone can do it? I have no problems adding controllers starting from 0, like in the first tutorial.



14.3k

Hi there, your action name on the controller should match the filename. example :

class AlarmController extends Phalcon\Mvc\Controller
{
    // this will render the view  /alarm/index.phtml by default OR the index.volt file.
    public function indexAction()
    {
        // you can also explicitly set the name of the view (file) you want to render
        // like this
        $this->view->pick('folderName/viewFileName'); 
    }
}


619
Accepted
answer

Try deleting the cookies.