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

How to use Camel Case Controller

I tripped up over this today and wasted too much time so for my own reference

In the controller CamelCaseController.php :

class CamelCaseController extends ControllerBase
{
...
}

In the views directory:

A sub-directory named "camel_case" that contains views that relate to actions.

In Security.php:

            $adminResources = [
                'camel_case' => ['index', 'save']
            ];

In routes:

$router->add("/admin/camelcase[/]{0,1}", "backend::camel_case::index");

//or

$router->add("/admin/camelcase[/]{0,1}", 
    [
        "module" => "backend",
        "controller" => "camel_case",
        "action" => "index"
    ]
);


7.0k

Got the same problem ! Mark!!