Simplest way to reduce the page number links in Laravel
Recently and currently(Laravel 5.6) Laravel is using Bootstrap-4 and they’ve updated all their views accordingly, and when you want to use Laravel’s pagination feature you may have a bit of a problem in the mobile world as there are too many page links to be shown in an esthetic way on a mobile screen.
So you can do a lot of things to resolve this problem but the simplest way available is to change the view which defines the links listening.
First, we need to publish that view, this will force Laravel to use the published view, not the one residing in the app-source/vendor directory.
We do that with the following command:
php artisan vendor:publish --tag=laravel-pagination
You should immediately see after executing the command the following:
Copied Directory [\vendor\laravel\framework\src\Illuminate\Pagination\resources\views] To [\resources\views\vendor\pagination]
Publishing complete.