Pagination with Custom model |
Add pager in your controller :
PHP Code: <?php namespace App\Controllers; And change your model from : PHP Code: public function annunci(){ To : PHP Code: public function annunci(){
(01-07-2021, 08:19 AM)includebeer Wrote: Ok, it wasn’t clear your model do not extend CodeIgniter’s model. We just see one function. Sorry to get back to you so late but wanted to thank you for your reply. I will look into it and try to solve the matter. I guess essentially I need to redefine my own paginate function if I understand you correctly
If he is not using the CodeIgniter Model then he needs to load the Pagination Library.
PHP Code: $pager = \Config\Services::pager(); What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |