Codeigniter 3 blog application: how can I avoid using a redundant $config pagination - 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: Codeigniter 3 blog application: how can I avoid using a redundant $config pagination (/showthread.php?tid=70712) |
Codeigniter 3 blog application: how can I avoid using a redundant $config pagination - Ajax30 - 05-19-2018 I am working on a blog application in Codeigniter 3.1.8. I have a Posts controller at Quote:application/controllers/Posts.php I have a Categories controller at Quote:application/controllers/Categories.php In the Posts controller I have: Code: public function index() { The Code: $config array in the Categories controller is almost the same: Code: public function posts($id) { How could I make a "base" $config array which, for every controller it is used in, I would only have to write what is specific? RE: Codeigniter 3 blog application: how can I avoid using a redundant $config pagination - InsiteFX - 05-19-2018 Read the CodeIgniter User's Guide on Pagination, it tell's you to create a ./application/config/pagination.php configuration file. |