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

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

藏色散人
Release: 2020-07-08 13:12:15
forward
3568 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:
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
Latest Issues
Composer cannot install laravel
From 1970-01-01 08:00:00
0
0
0
Laravel Space/laravel-backup cannot be installed
From 1970-01-01 08:00:00
0
0
0
Laravel 5.1 Login laravel comes with it No more
From 1970-01-01 08:00:00
0
0
0
Why thinkphp has better performance than laravel?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template