Bootstrap laravel pagination
Mon Feb 27 2023 13:47:24 GMT+0000 (Coordinated Universal Time)
Saved by
@ahmad007
In controller
1. $customers= Customer::paginate(10);
Then after foreach and table
<div class="d-flex justify-content-center">
{{ $customers->links() }}
</div>
2. Then youcan view pagination but unable to properly format
3. Then execute the following command
php artisan vendor:publish
tyhen select the laravel pagination
4. Then in AppServiceProvider.php enter the following code in the header
use Illuminate\Pagination\Paginator;
and in the metod boot(): void enter the following code
Paginator::useBootstrap();
content_copyCOPY
Comments