[SOLVED] Pagination |
Using this method the pagination is working fine! But how can I filter the data? For example I'm logged with user id: 1 and I want to see only companies that belongs to this user.
Using the instance like this I'll always get all the rows of this table =/ public function list(){ $companyModel = new CompanyModel(); $data = [ 'obj' => $companyModel->paginate(20, 'group1'), 'pager' => $companyModel->pager ]; echo view('Template/header'); echo view('Company/listar', $data); echo view('Template/footer'); } Code: $companyModel
Thank you a lot [b]kilishan[/b]!!!!
This works! Code: $companyModel This DONT work Code: $companyModel Pay attention in the order when creating a pagination guys! |
Welcome Guest, Not a member yet? Register Sign In |