当前位置:网站首页>TP5 paging some small points
TP5 paging some small points
2022-07-27 16:22:00 【Collect and learn by yourself】
1、$data = Db::name('tableName')->where($where)->paginate(2, false, [
'query' => request()->param(),
]);
In this way, you can take parameters , Click other pages to transfer parameters
2、$data->currentPage();
Return to the current page
3、$data->lastPage();
Go back to the last page , It can also be used as the total number of pages
4、paginate Some main parameters 
'total' => $r->total(), // Total number of records
'cur' => $r->currentPage(), // The current page number
'size' => $r->listRows(), // Records per page
'list' => $r->items() // Paging data
边栏推荐
- mysql设置密码时报错 Your password does not satisfy the current policy requirements(修改·mysql密码策略设置简单密码)
- Chuanyin holdings disclosed that it was prosecuted by Huawei: a case has been filed, involving an amount of 20million yuan
- Personal perception of project optimization
- profileapi. h header
- DeFi安全之DEX与AMMs
- Oracle 常用语句
- flume增量采集mysql数据到kafka
- Busybox login: can't execute'/bin/bash': no such file or directory solution
- Common tool classes under JUC package
- Nacos
猜你喜欢
随机推荐
2.2 basic elements of JMeter
Busybox login: can't execute'/bin/bash': no such file or directory solution
Openwrt compilation driver module (write code at any position outside the openwrt source code, and compile independently in a modular manner.Ko)
Servlet basic knowledge points
TSMC's 6-nanometer manufacturing process will enter trial production in the first quarter of next year
Have you ever used the comma operator?
判断数据的精确类型
Mapreduce实例(一):WordCount
Content ambiguity occurs when using transform:translate()
DRF use: get request to get data (small example)
MapReduce instance (I): wordcount
文本截取图片(哪吒之魔童降世壁纸)
MySQL index
profileapi.h header
Servlet基础知识点
openwrt 增加RTC(MCP7940 I2C总线)驱动详解
For enterprise operation and maintenance security, use the cloud housekeeper fortress machine!
4-digit random data
C language realizes the conversion between byte stream and hexadecimal string
可载100人!马斯克发布史上最强“星际飞船” !最早明年上火星!









