![]() |
Is Codeigniter 4 supports "Verb Based Routing"? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Feature Requests (https://forum.codeigniter.com/forumdisplay.php?fid=29) +--- Thread: Is Codeigniter 4 supports "Verb Based Routing"? (/showthread.php?tid=67418) |
Is Codeigniter 4 supports "Verb Based Routing"? - atishamte - 02-20-2017 GET /api/order Returns all orders GET /api/order/3 Returns details order #3 POST /api/order Create new order PUT /api/order/3 Update order #3 DELETE /api/order/3 Delete order #3 The above is considered verb-based routing. The URLs above only contain the controller name and an optional id. So the Web API uses the HTTP verb of the request to determine the action method to execute in your ApiController subclass. RE: Is Codeigniter 4 supports "Verb Based Routing"? - baselbj - 02-20-2017 according to CI4 documentation, it is possible (https://bcit-ci.github.io/CodeIgniter4/general/routing.html#id14) RE: Is Codeigniter 4 supports "Verb Based Routing"? - InsiteFX - 02-21-2017 CodeIgniter 4 Development Users Guide - Using HTTP verbs in routes |