![]() |
Using variables as the controller name for routes - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11) +--- Thread: Using variables as the controller name for routes (/showthread.php?tid=79412) Pages:
1
2
|
RE: Using variables as the controller name for routes - paulbalandan - 07-16-2021 (07-16-2021, 04:22 AM)John_Betong Wrote: @eril46,Hi! 1) BaseController is an abstract controller class. Being such, it cannot be used for routing purposes, so basically it's exempted from the restrictions. 2) If you're using the auto-routing feature, this quote MUST be followed strictly. 3) If you are instead defining each route explicitly, no need to follow this but we use and recommend the PascalCase naming convention (actually used for all classes in the framework). (06-11-2021, 11:51 AM)eri146 Wrote: Hello, I have a POST request. For example In theory, this is workable BUT NOT recommended. This practice can pose a lot of complications in the future. Foremost, you have to make sure all possible combinations are available classes and methods, otherwise you have to devise your own failover. Simply do not do this. RE: Using variables as the controller name for routes - Escuela de Letras - 07-19-2021 Yes, we can do that! RE: Using variables as the controller name for routes - Showti11 - 04-16-2023 (07-19-2021, 11:04 AM)Escuela de Letras Wrote: Yes, we can do that! You can do it but you'd have to re-write certain system config files to allow it. It's not worth the headache. Just use the systems as it's designed, for less headache and optimum security. |