Such as the title: There are hundreds of pages of data taken out from the database. However, the paginator provided by laravel only displays the pages before and after the current page.
But when I want to jump to a page that is not on the paging bar, I can only gradually reach the desired page through page jumps.
Is there a way to display an input box on the paging bar, where the user can enter a custom page number and then jump to the page to browse the data.
I tell you clearly that it is possible, and it is very simple. There are two methods, both of which are operated under the
views/vendor/pagination
directory:Modify
default.blade.php
, similar code is as follows:Customize a paging template file, such as
custom.blade.php
,然后在其他模板中的分页方法参数中指定这个分页模板,如{!! $articles->render('vendor/pagination/custom') !!}
;