How to change first pagination link URL in codeigniter 4 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: How to change first pagination link URL in codeigniter 4 (/showthread.php?tid=87169) |
How to change first pagination link URL in codeigniter 4 - ashisbiswas - 03-22-2023 I want to make pagination in CodeIgniter 4 like the below: PHP Code: http://localhost:8080/admin/all-clients So here is my method: PHP Code: public function index($page = 1){ here is my route: PHP Code: $routes->get('all-clients', 'ClientsController::index'); In pagination links, the first page URL is http://localhost:8080/admin/all-clients/page/1. But I want http://localhost:8080/admin/all-clients/ and the rest of the pagination links should be http://localhost:8080/admin/all-clients/page/2, http://localhost:8080/admin/all-clients/page/3 .... So, my question is how to do that. RE: How to change first pagination link URL in codeigniter 4 - kenjis - 03-23-2023 Customize the Pager class. See https://codeigniter4.github.io/CodeIgniter4/extending/core_classes.html#replacing-core-classes |