nulltex/laravel-paginator
Composer 安装命令:
composer require nulltex/laravel-paginator
包简介
Laravel most flexible paginator
关键字:
README 文档
README
Allows to pass route name to paginator for generate custom URLs.
Installation
You can install the package via composer:
composer require nulltex/laravel-paginator
Usage
You can use setRoute() method for set custom route name that will be used for generate pagination links.
Example:
$query = Model::query(); $paginator = $query->paginate()->setRoute(['route.name'])
By default paginator generates relative URL.
If you want to use absolute ones just call setRouteAbsoluteUrl()
$paginator->setRouteAbsoluteUrl(true)
Note: $pageName (default values is page) will be automatically applied to the route params.
If you want to change it just use setPageName().
For send some additional params into Route (excepting $pageName) pass them as array in the second item:
$query = Model::query(); $paginator = $query->paginate()->setRoute(['route.name', ['param' => 'value']])
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-10-20