| Package Data | |
|---|---|
| Maintainer Username: | branchzero |
| Maintainer Contact: | branchzero@gmail.com (BranchZero Sun) |
| Package Create Date: | 2018-02-21 |
| Package Last Update: | 2018-03-12 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-10-27 03:09:00 |
| Package Statistics | |
|---|---|
| Total Downloads: | 11,987 |
| Monthly Downloads: | 45 |
| Daily Downloads: | 2 |
| Total Stars: | 2 |
| Total Watchers: | 2 |
| Total Forks: | 3 |
| Total Open Issues: | 0 |
Inspired By Illuminate Pagination, This Package Used For Api Pagination (by limit/offset)
composer require "elemenx/laravel-api-pagination"
On bootstrap/app.php add:
$app->register(ElemenX\ApiPagination\PaginationServiceProvider::class);
use ElemenX\ApiPagination\Paginatable;
class User {
use Paginatable;
}
This is an example for how to use this package.
$users = User::apiPaginate(100); // 100 is your defalut limit number
when you visit with
http://api.dev/user?limit=100&offset=0
It will return Structure As follows.
[
'data' => [
[
'id' => 1,
'name' => 'test'
]
],
'meta' => [
'limit' => 100,
'offset' => 0,
'total' => 1
]
]