dimanche 11 octobre 2015

Laravel 5- Generate pagination using total records & rows per page count

I have a JSON response which is contain the following attributes

  • totalItems
  • rowsPerPage
  • currentPage
  • baseUrl

Now I want to generate pagination links using Laravel Paginator.

So far, I tried like this and getting empty response. Any idea?

use Illuminate\Pagination\Paginator;

$pagination = new Paginator($totalItems, $rowsPerPage, $currentPage,['path' => $baseUrl ]);

dd($pagination->render());



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire