Registering another controller to the ownnotes application

Hello everybody,

when the ownnotes app is created from the ocdev startapp command, it includes a default controller called pagecontroller.php. In my application I’d like to include another controller i.e. anothercontroller.php. In the manual it is presented as every controller has to be registered in the container through an application.php file. However, in the ownnotes app there is no application.php file. I wonder how the pagecontroller.php is working without being registered while my poor anothercontroller.php doesn’t work at all… Anybody knows?

Thank’s a lot!

It’s not needed to register them anymore. You can just use convention over configuration, e.g. put a new controller in place called SomeThingElseController and then you can link it in your routes.php by using the name some_thing_else

1 Like