COUPDEGRACES's avatar

Where to edit template pagination default by laravel 8

Hi , im using laravel 8 . and my blog , i use pagination system to handle my table .

but when im using

{{ $data->links() }}

I'm got output like

Pagination.next and pagination.prev

how i can custom text Pagination.next and pagination.prev

0 likes
1 reply
bobbybouwmann's avatar
Level 88

Well, there are two solutions here.

First up is the translations. By default, laravel has translations available for the pagination. You can find them in resources/lang/en/pagination.php.

The second option is publishing the partials for and updating those. You can publish them by running

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

After that you should find the files in resources/views/vendor/pagination.

Documentation: https://laravel.com/docs/8.x/pagination#customizing-the-pagination-view

If you only need to change the text, the first option is the best solution ;)

2 likes

Please or to participate in this conversation.