lartie/api-pagination

Laravel Api Pagination
23 6
Install
composer require lartie/api-pagination
PHP:>=7
License:MIT
Last Updated:Apr 14, 2021
Links: GitHub  ·  Packagist
Maintainer: lartie

Laravel Api Pagination

Installation

Composer

composer require "lartie/api-pagination"

ApiPaginationTrait

Include ApiPaginationTrait trait inside your model.

class User extends Model
{
    use ApiPaginationTrait;

And that's it!

Usage

How To Use

User::where('is_blocked', false)->apiPagination($limit, $offset);

Result

[
    'items' => [...],
    'hasNextPage' => true, //or false
]

License

The MIT License (MIT). Please see License File for more information.

Related Packages

denmasyarikin/laravel-api-pagination

API Pagination For Laravel & Lumen

336 0
elemenx/laravel-api-pagination

API Pagination For Laravel & Lumen

12,654 2
php-tmdb/laravel

Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the...

53,303 162
kavenegar/laravel

laravel 4 and 5 kavenegar integration

350,771 85
cyvelnet/laravel5-fractal

A simple fractal service provider and transformer generator with model attribute...

189,086 79