dutchcodingcompany/cursor-pagination

Cursor pagination for Laravel Lighthouse GraphQL API

Downloads

225

Stars

1

Version

0.1.1

Very short description of the package

Latest Version on Packagist Build Status Quality Score Total Downloads

This Laravel package brings cursor based pagination support to Laravel and Lighthouse in particular.

Installation

You can install the package via composer:

composer require dutchcodingcompany/cursor-pagination

Usage

GraphQL

Add 'DutchCodingCompany\\CursorPagination\\Directives' to config/lighthouse.php under

namespaces => [
   'directives' => ['DutchCodingCompany\\CursorPagination\\Directives']
]

Builder

Call cursorPaginate() on an Eloquent or Query Builder

User::orderBy('updated_at', 'asc')->cursorPaginate($limit);

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

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

DutchCodingCompany

Author

DutchCodingCompany