ajiho/think-paginator-driver

page driver for thinkphp6

V1.0.0 2022-08-16 07:49 UTC

This package is auto-updated.

Last update: 2024-10-20 09:53:45 UTC


README

composer require ajiho/think-paginator-driver

支持的分页驱动

  • bootstrap5

使用

全局生效

app/provider.php文件中重新绑定think\Paginator分页服务驱动

'think\Paginator' => \ajiho\paginator\driver\Bootstrap5::class

部分应用生效

在应用目录中新建provider.php文件,然后重新绑定服务即可

'think\Paginator' => \ajiho\paginator\driver\Bootstrap5::class

单次生效

在调用paginate分页方法前,重新绑定服务

\think\facade\App::bind('think\Paginator', \ajiho\paginator\driver\Bootstrap5::class);
$users = User::paginate(10);
//...