Laravel: setting paginated links to pages

I am building an application with Laravel 5.5. and I need to set up pagination. I need to apply the css class on page link elements. Where can I find a template to override?

+4
source share
3 answers

You need to run this command from the terminal:

php artisan vendor:publish --tag=laravel-pagination

This creates views in the directory resources/views/vendor/pagination.

Now you can use the classes in the presentation: default.blade.php.

Read the documentation here: https://laravel.com/docs/5.6/pagination#customizing-the-pagination-view

+4
source

php artisan vendor:publish --tag=laravel-pagination, resources/views/vendor/pagination, .

resources/views/vendor/pagination. default.blade.php . , .

+1

:

{{ $paginator->links('view.name') }}

:

, , CSS Bootstrap. , Bootstrap, . paginator

.

:

However, the easiest way to configure pagination is to export them to a directory resources/views/vendorusing the command vendor:publish:

php artisan vendor:publish --tag=laravel-pagination

This command will put the views in a directory resources/views/vendor/pagination. The file default.blade.phpin this directory corresponds to the default pagination view. Edit this file to change the pagination code.

Or, if you just changed the standard Bootstrap classes, you can just load the CSS after loading Bootstrap.

+1
source

Source: https://habr.com/ru/post/1693739/


All Articles