Pagination don't work - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Pagination don't work (/showthread.php?tid=74851) |
Pagination don't work - dimonisse - 11-15-2019 Hi all! I'm trying to configure pagination for my project, I do everything according to the documentation, but I get an error. With version 3, there were no such problems (( PHP Code: lass User extends Controller{ Model: PHP Code: class UserModel extends Model Quote:Error RE: Pagination don't work -> problem resolved - dimonisse - 11-15-2019 as it turned out, in the file \system\Model.php, line 442 $ this-> tempReturnType = $ this-> returnType; costs AFTER $ row = $ row-> getResult ($ this-> tempReturnType); I moved it before this expression and it worked. RE: Pagination don't work - pi26 - 02-18-2021 Change your model like this: Code: class UserModel extends Model RE: Pagination don't work - InsiteFX - 02-18-2021 Your re-initializing the db and builder in your models constructor. When you extend the Model you have access to $this->db and $this->builder. You need to read up on CodeIgniter Models in the Users Guide. RE: Pagination don't work - wdeda - 02-18-2021 Simple things work better. Less is more. Of course, simple sugestions. Model: PHP Code: <?php<?php Controller: PHP Code: <?php namespace App\Controllers; A portion of the View(pager) PHP Code: <div class="users-pages-index"> |