I know that you can add a controller into the src/Controller/
folder directly, and Joomla automatically recognizes it as a controller class, and you can route to it using either
?controller=controllername
?task=controllername.task
But this doesn't seem to work if the controller class is in a directory, for example: src/Controller/User/ControllerName.php
.
How do I use folders?
Edit: The reason for adding folders is because there are many controllers, and having them grouped together is helpful.