![]() |
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
[quote pid="389482" dateline="1629662131"]
i think is difficult to solve . suggest create your own core router class https://codeigniter.com/user_guide/exten...re-classes [/quote]
This might be what your looking for.
CodeIgniter User Guide - Remapping Method Calls Read it carerfully. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Hmm that what I'm looking for, thanks you so much for the reply !
Actually learning CodeIgniter4 and creating a complex CMS system for fan-translations teams (Kagescan)
@LoganTann on GitHub // French // He-Him |
Welcome Guest, Not a member yet? Register Sign In |