You can quickly create a handful of RESTful routes for a single resource with the resource() method. This creates the five most common routes needed for full CRUD of a resource: create a new resource, update an existing one, list all of that resource, show a single resource, and delete a single resource.
Framework CodeIgniter 4.0.2
Versi PHP: 7.4.10
Versi server: 10.4.14-MariaDB