当前位置:网站首页>Tp5.1 paging (with parameter transfer)
Tp5.1 paging (with parameter transfer)
2022-07-25 02:34:00 【51CTO】
Controller code
With no arguments :
$rs = Db::name('admin')->order(['id'=>'desc'])->paginate(1);
Passing with parameters :
$rs=Db::name('admin')->where($where)->order(['id'=>'desc'])->paginate(10,false,['query' => request()->param()]);
['query' => request()->param()], How many parameters are passed will be automatically added to you , It doesn't need to be written like this, one parameter by one (->paginate(10,false,['query' => ['cate_id'=>$cate_id], ['keyword'=>$keyword]]); )
Templates :

{$page|raw}
CSS Page style
边栏推荐
- My creation anniversary (3rd Anniversary)
- Jenkins configuration plug-in interface displays "suggestions collection" in Chinese
- See you in Suzhou! "Cloud Intelligence Technology Forum - industry special" will be held soon
- Seven text editors that programmers should know are necessary for programming
- Summary thinking caused by the function of a SMS verification code [easy to understand]
- Experienced the troubleshooting and solution process of an online CPU100% and the application of oom
- After working for two months in the summer vacation, I understood three routing schemes of keepalived high availability
- JS utils tool function that makes you get twice the result with half the effort
- Vs2019 configuring Qt5 development environment
- How to judge which star you look like?
猜你喜欢
Windows Server 2022 received a non security update in July: fix the sticking problem caused by defender

ICO objects in classification

A bit of knowledge - websites about scripts

Industrial control safety PLC firmware reverse III

Digital commerce cloud fine chemical industry management platform integrated informatization solution

R language uses logistic regression, ANOVA, outlier analysis and visual classification iris iris data set

Sword finger offer 11. rotate the minimum number of the array

MySQL advanced (13) command line export import database

Easy to master SSO single sign on, see this article

Case analysis of building exhibition service management system with low code development platform
随机推荐
Using the artifact typora+picgo, Youdao cloud can automatically upload pictures in markdown without members
When sharing a folder, the 'attempt to share xxxxx
"I gave up programming and wrote a 1.3 million word hard science fiction."
【C】 Advanced knowledge of file operation
Text reading end judgment
Get to know string thoroughly
Use Fiddler to capture apps
"No such plugin: cloudbees folder" solution appears when Jenkins selects the recommended plug-in for the first time
Cloud native platform, let edge applications play out!
Jedispoolconfig parameter configuration from the perspective of source code
Flutter apple native Pinyin keyboard input exception on textfield | Pinyin input process callback problem
File file name change
DNA helped solve the outstanding case 30 years ago. The suspect strangled his girlfriend because he fell in love with his roommate. He was already the CEO of the technology company when he was arreste
After working for two months in the summer vacation, I understood three routing schemes of keepalived high availability
Explanation of C language file operation function
xts performance auto fix script
In the post deep learning era, where is the recommendation system going?
[C language] program compilation (preprocessing)
After upgrading v2.1.0, the synchronization failed
A weird jedisconnectionexception: connection rejected problem