mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-12-04 20:58:13 +08:00
Update paginator.md
This commit is contained in:
parent
c8e3fcd421
commit
5920bc7df5
@ -12,23 +12,8 @@
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
||||
namespace App\Controller;
|
||||
|
||||
use Hyperf\DbConnection\Db;
|
||||
use Hyperf\HttpServer\Annotation\AutoController;
|
||||
|
||||
/**
|
||||
* @AutoController
|
||||
*/
|
||||
class UserController
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
// 展示应用中的所有用户,每页显示 10 条数据
|
||||
return Db::table('users')->paginate(10);
|
||||
}
|
||||
}
|
||||
// 展示应用中的所有用户,每页显示 10 条数据
|
||||
return Db::table('users')->paginate(10);
|
||||
```
|
||||
|
||||
## 模型分页
|
||||
|
Loading…
Reference in New Issue
Block a user