Controller naming PascalCase |
I've lost more than 3 hours today with this issue.
I tried my project on a web server today and I didn't understand why most of my urls returned to a 404 error when I had no problem locally. I understood that this was due to the name of my controllers which are named in PascalCase (ex: MyProfile.php). For now, the only way to solve this is to rename my controllers like this "Myprofile.php" but that disturbs me, I don't find this clean. May be it can be solved with "mod_speling" (CheckSpelling and CheckCaseOnly) but I cannot edit the "httpd.conf" file. What do you think about this? I found a solution. It's not really good but it works. I can add some routes like this: PHP Code: $routes->add('myprofile', 'App\Controllers\MyProfile::index'); |
Messages In This Thread |
Controller naming PascalCase - by RedskyThirty - 12-12-2019, 12:24 PM
RE: Controller naming PascalCase - by ciadmin - 12-12-2019, 01:53 PM
RE: Controller naming PascalCase - by berendbotje91 - 12-12-2019, 11:34 PM
RE: Controller naming PascalCase - by RedskyThirty - 12-16-2019, 01:09 AM
RE: Controller naming PascalCase - by dave friend - 12-19-2019, 12:02 AM
RE: Controller naming PascalCase - by RedskyThirty - 12-19-2019, 01:27 AM
RE: Controller naming PascalCase - by MGatner - 12-20-2019, 07:32 AM
|