IDEA: Controller Extended by Default |
I do like that this puts it in the same directory and namespace as the controllers that will extend it. I think it will still need a route though, because otherwise visiting example.com/base will give cause "Controller method is not found: index" since the controller itself is valid.
If everyone is feeling good about this I will open a pull request as the next part of the conversation. Here is my updated skeleton proposal given this new location: PHP Code: <?php namespace App\Controllers; And I'd recommend adding this to system/Config/Routes.php: PHP Code: // Prevent access to Base controller *Note: forPageNotFound() currently incorrectly requires a parameter. I have a pull request to fix this: https://github.com/codeigniter4/CodeIgniter4/pull/1842 |
Messages In This Thread |
IDEA: Controller Extended by Default - by MGatner - 03-18-2019, 07:28 AM
RE: IDEA: Controller Extended by Default - by InsiteFX - 03-18-2019, 08:18 AM
RE: IDEA: Controller Extended by Default - by titounnes - 03-19-2019, 03:08 AM
RE: IDEA: Controller Extended by Default - by kilishan - 03-18-2019, 09:55 AM
RE: IDEA: Controller Extended by Default - by MGatner - 03-18-2019, 12:27 PM
RE: IDEA: Controller Extended by Default - by MGatner - 03-19-2019, 07:25 AM
RE: IDEA: Controller Extended by Default - by kilishan - 03-19-2019, 08:07 PM
RE: IDEA: Controller Extended by Default - by MGatner - 03-20-2019, 08:07 AM
RE: IDEA: Controller Extended by Default - by kilishan - 03-20-2019, 08:40 AM
RE: IDEA: Controller Extended by Default - by MGatner - 03-20-2019, 10:23 AM
RE: IDEA: Controller Extended by Default - by MGatner - 03-20-2019, 11:10 AM
|