Need Help |
Hello all!! I hope someone can help me really quick here!
So this is my case, I've got a table of items, and the items have 4 different types. And I've got a column named types, the value that differs in that column are from 1 to 4. So with this part: $model = new ButikkModel(); $data['currentPage'] = $this->request->getVar('ovn_page') ? $this->request->getVar('ovn_page') : 1; $data = [ 'ovner' => $model->where('type', '1') ->orderBy('created_at', 'DESC') ->findAll(), 'pager' => $model->pager ]; it grabs the items just fine, that has type "1". But I can't pagination this... How would I go ahead and do this? Normally you can just add ->pagination after $model, but can't do that because it's an array when using findAll(). Anyone?
Call paginate() instead of findAll(). You can see an example on how to do pagination in this tutorial: https://includebeer.com/en/blog/how-to-b...r-4-part-4
@Milina I move the thread in General Help. This had nothing to do with installation problems.
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
I hope you received some help with it.
Did you? |
Welcome Guest, Not a member yet? Register Sign In |