![]() |
Hello,
I'm creating a standalone image manager module for my website. I have a controller class with 8 public methods (so, 8 pages that might share the same private helpers and constants), but even if there is currently one file, I want to organize every container modules into a folder : src/ ├───Controllers/ │ │ someFiles.php │ └───Img/ │ Img.php The URL to access to the "image foobar preview page" (which is the "view" method with the argument "foobar" inside the Controllers/Img/Img.php class) is localhost:8080/Img/Img/view/foobar. The URL is a bit big, so I want to change it to "localhost:8080/img/view/foobar" easily. What I tried so far and don't work :
Is there a way to achieve what I want, without making a route rule for every method inside the controller ? Here is the source code of my controller as of today (commit 2df0b2f) : https://github.com/Kagescan/code.kagesca...mg/Img.php Thanks in advance !
Actually learning CodeIgniter4 and creating a complex CMS system for fan-translations teams (Kagescan)
@LoganTann on GitHub // French // He-Him |
Messages In This Thread |
better auto routing for controllers inside folders - by ShinProg - 08-22-2021, 12:55 PM
RE: better auto routing for controllers inside folders - by wuuyun - 08-22-2021, 07:28 PM
RE: better auto routing for controllers inside folders - by InsiteFX - 08-23-2021, 01:53 AM
RE: better auto routing for controllers inside folders - by ShinProg - 11-21-2021, 05:57 AM
|