定制 heseya/pagination 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

heseya/pagination

最新稳定版本:1.0.4

Composer 安装命令:

composer require heseya/pagination

包简介

Heseya Pagination Middleware for Laravel

README 文档

README

Middleware that automatically sets pagination for all endpoints.

How it's work?

You add middleware in App\Http\Kernel

protected $middleware = [
    ...
    Heseya\Pagination\Http\Middleware\Pagination::class,
];

or to specific route in router

Route::get(...)->middleware(Pagination::class);

Now when you send parameter limit

/products?limit=50

you can use pagination.per_page config key to set pagination limit

public function index()
{
    return Product::paginate(Config::get('pagination.per_page'));
}

Installation

composer require heseya/laravel-pagination
php artisan vendor:publish --tag=pagination

统计信息

  • 总下载量: 4.21k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-01-17