Welcome Guest, Not a member yet? Register   Sign In
How to make pagination for search results
#10

You're passing a new instance of the $pager in. This one isn't attached to any results so doesn't know what to display, so it only displays the 1 you're seeing. Instead of passing the new instance in, you need to grab the one from the model.

PHP Code:
$results $this->searchModel->get_results($search);
               
$data = [
'webpages' => $results,
'pager' => $this->searchModel->pager,
]; 
Reply


Messages In This Thread
RE: How to make pagination for search results - by kilishan - 09-30-2021, 06:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB