paint-brush
Dynamic (but limited) Page Size with Laravel Paginationby@deleugpn
9,050 reads
9,050 reads

Dynamic (but limited) Page Size with Laravel Pagination

by Marco Aurélio Deleu2mJanuary 11th, 2018
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Laravel makes pagination an extremely simple process, you simply call <code class="markup--code markup--p-code">paginate()</code> on Eloquent and be done with it. Today I received a feature request where I had to allow the front-end team to decide the size of the page. It’s also a simple task, you just give it as a parameter <code class="markup--code markup--p-code">paginate($size);</code>. Something like this:

Company Mentioned

Mention Thumbnail
featured image - Dynamic (but limited) Page Size with Laravel Pagination
Marco Aurélio Deleu HackerNoon profile picture
Marco Aurélio Deleu

Marco Aurélio Deleu

@deleugpn

L O A D I N G
. . . comments & more!

About Author

Marco Aurélio Deleu HackerNoon profile picture
Marco Aurélio Deleu@deleugpn

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite