Home>Article>PHP Framework> About laravel's own paging implementation to add parameters to url

About laravel's own paging implementation to add parameters to url

藏色散人
藏色散人 forward
2020-07-08 13:12:15 3419browse

The following tutorial column ofLaravelwill introduce laravel’s own paging to implement url adding parameters. I hope it will be helpful to friends in need!

About laravels own paging implementation to add parameters to url

If you want to implement the url with parameters in the above picture, you only need to add an appends() function in front of the render() function

{!! $lessions->appends(['title'=>'article','price'=>500])->render() !!}

us When getting the value, you can actually get it from back to front

return \App\User::latest()->paginate(3);

About laravels own paging implementation to add parameters to url

If you want to get the value of every three pieces of data at the same time

@foreach($lessions->chunk(3) as $row) @foreach($row as $lession) {{ $lession->title }} @endforeach @endforeach

The above is the detailed content of About laravel's own paging implementation to add parameters to url. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:jianshu.com. If there is any infringement, please contact admin@php.cn delete