ajiho / think-paginator-driver
page driver for thinkphp6
V1.0.0
2022-08-16 07:49 UTC
Requires
- topthink/framework: ^6.0.0
This package is auto-updated.
Last update: 2024-11-20 09:59:31 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); //...