Laravel 4.2 pagination links only loads first page on another server, same code working fine on my server

133 Views Asked by At

I have one web admin in laravel 4.2 running on PHP 7.2.30 on my server. Here I have used laravel pagination to generate pagination links in view pages and everything working fine on my server.

However, once I have uploaded the same code to another server which is running on PHP 7.3.x, then pagination links just load the first page only on clicking any page link.

For example, below is code for one of the page with pagination,

Controller function:-

public function game_clues_list($id)
{
    $rec_per_page = Session::get('REC_LIMIT');
    $game_clues = GameClue::where('iGameId','=',$id);
    $pagination = $game_clues->paginate(5);
    $records = $pagination->getCollection();
    $pagination_next = $pagination->links();
    return View::make('admin.future-game.game_clue_list')->with(array(
        'record' => $records,
        'pagination' => $pagination_next,
        'pagnotr'=>$pagination));
}

View file code:-

<div class="row-fluid">
    <div class="span4" style="margin-top: 13px;"><div class="dataTables_info"><?php echo 'Showing '.$pagnotr->getFrom().' to '.$pagnotr->getTo().' from '.$pagnotr->getTotal(); ?> </div>
    </div>
<div class="span8 view_list">
    <div class="dataTables_paginate paging_bootstrap pagination">
        <ul id="paginators">    
            {{$pagination}}
        </ul>
    </div>
</div>

Any help will be appreciated. Thanks.

0

There are 0 best solutions below