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"
    ]
);


4.6k

Got the same problem ! Mark!!