![]() |
When using CodeIgniter 4, the Presenter show(id) method appears to overwrite custom functions that I have added. This results in a 404 error when trying to access these functions, with the message:
Code: { However, if I configure the routes in Routes.php to exclude the show method using ['except' => 'show'], the custom functions work correctly. PHP Code: $routes->presenter('example', ['except' => 'show', 'filter'=> 'jwt', 'namespace' => '\App\Controllers\Api']); How to exclude only example/(;segment). So additional functions will not be overwritten. Any suggestions? Code: +--------+-------------------------+--------------------+--------------------------------------------------------------------+----------------+---------------+ https://codeigniter.com/user_guide/incom...comparison
Define the routes for the custom functions before calling the `$routes->presenter('example', ...)`.
|
Welcome Guest, Not a member yet? Register Sign In |