• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pagination Issues

#1
Hi. I'm having trouble paging.

I want to sort the results using Order By, but it returns the data incorrectly.

PHP Code:
$data = [
    
'jornadas' => $jornadaModel->orderBy('status DESC, fecha_jornada DESC')->paginate(10),
    
'pager' =>$jornadaModel->pager
]; 
This works fine.
PHP Code:
$data = [
    
'jornadas' => $jornadaModel->paginate(10),
    
'pager' =>$jornadaModel->pager
]; 

I appreciate the answer. How can I paginate the data in an orderly manner?
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.