這篇文章主要介紹laravel自帶分頁(yè)實(shí)現(xiàn)url添加參數(shù)的方法,文中介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們一定要看完!
如果想要實(shí)現(xiàn)上圖中url帶參數(shù),只需要在render()函數(shù)前面添加一個(gè)appends()函數(shù)即可
{!! $lessions->appends(['title'=>'article','price'=>500])->render() !!}
我們?nèi)≈档臅r(shí)候其實(shí)也可以從后往前取
return \App\User::latest()->paginate(3);
如果想要實(shí)現(xiàn)每三條數(shù)據(jù)的一起取值
@foreach($lessions->chunk(3) as $row) @foreach($row as $lession) {{ $lession->title }} @endforeach @endforeach
以上是“l(fā)aravel自帶分頁(yè)實(shí)現(xiàn)url添加參數(shù)的方法”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對(duì)大家有幫助,更多相關(guān)知識(shí),歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!