荷兰编码公司 / 游标分页
Laravel Lighthouse GraphQL API 的游标分页
0.1.1
2020-06-26 09:59 UTC
Requires
- php: >=7.2
- illuminate/database: 6.*|7.*
- illuminate/support: 6.*|7.*
- nuwave/lighthouse: ^4.8
Requires (Dev)
- orchestra/testbench: ^4.0
- phpunit/phpunit: ^8.0
This package is auto-updated.
Last update: 2024-08-26 19:16:54 UTC
README
此 Laravel 包将基于游标的分页支持引入 Laravel 和 Lighthouse。
安装
您可以通过 composer 安装此包
composer require dutchcodingcompany/cursor-pagination
用法
GraphQL
将 'DutchCodingCompany\\CursorPagination\\Directives'
添加到 config/lighthouse.php 中的
namespaces => [
'directives' => ['DutchCodingCompany\\CursorPagination\\Directives']
]
构建器
在 Eloquent 或 Query Builder 上调用 cursorPaginate()
User::orderBy('updated_at', 'asc')->cursorPaginate($limit);
测试
composer test
变更日志
请参阅 CHANGELOG 以获取最近更改的更多信息。
贡献
请参阅 CONTRIBUTING 以获取详细信息。
安全
如果您发现任何与安全相关的问题,请通过电子邮件 m@rcoboe.rs 而不是使用问题跟踪器来报告。
致谢
许可
MIT 许可证 (MIT)。请参阅 许可文件 以获取更多信息。