Download the PHP package vitorf7/lv-loadmorepagination without Composer
On this page you can find all versions of the php package vitorf7/lv-loadmorepagination. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vitorf7/lv-loadmorepagination
More information about vitorf7/lv-loadmorepagination
Files in vitorf7/lv-loadmorepagination
Package lv-loadmorepagination
Short Description Load More Pagination for Laravel. Allows to load an initial number of items and subsequent pages can load a different number of items
License MIT
Informations about the package lv-loadmorepagination
Laravel Load More Pagination
A package that will give you access to a LoadMorePagination trait where you can paginate your model's results with an initial number of items and then a different number of items on subsequent pages.
This package does not implement any paginator interfaces or anything like that it simply returns a similar array to a paginator with the usual information such as last_page, current_page, data, etc.
Usage
To install this package do the following:
Once installed you can use this in two ways. Either by imporating this into your Eloquent Model or using it in your Controller or Repository, etc.
This package has an initial load of 9 items and subsequent load of 3.
In a Model:
If you want to use it in a Controller, Repository, etc you need to pass 3 arguments.
- 1st Argument is the inital load of items
- 2nd Argument is the load of subsequent items
- 3rd Argument is the Model you are trying to paginate
Like so:
If you do not pass a model you will get a
All versions of lv-loadmorepagination with dependencies
illuminate/support Version ~5.0
illuminate/pagination Version ~5.0
illuminate/database Version ~5.0