Home > PHP Framework > Laravel > body text

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

藏色散人
Release: 2020-07-08 13:12:15
forward
3482 people have browsed it

The following tutorial column of Laravel will 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() !!}
Copy after login

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

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

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
Copy after login

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!

Related labels:
source:jianshu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!