When I change the name of the “customers” method in the Example controller, I get the CI4 404 error page, “method is not found”. So the errors seems to be after the controller loading.
When I don’t use the AutoRoute, the error message changes : “message”: “Can’t find a route for ‘get: example/customers&action=initial’.”,
First of all, thank you for the detailed report since it is easier for me to help you. In order to solve the issue that you have it is better to has the AutoRoute as false and add the Routes manually. For example for your case you can add the following into your Route file (app/Config/Routes.php):
// Make sure that you always add get and post functions
$routes->get('/example/customers', 'Example::customers');
$routes->post('/example/customers', 'Example::customers');
Helllo Johnny, thanks for your answer at this time of year
After I modified the routes as you’ve advised, I got a 404 - Not Found error, again in a modal and GC JS loading correctly in the network tab of the dev tools.
Hello, thaks for your answer, the controller is the same as the tutorial. It seems i have a CI config error somewhere. I’ll search more, but the deadline is looming, so i’ll go with a simmple table for now.