How to use bootstrap pagination in laravel 8

You can use bootstrap pagination in laravel 8 using Paginator::useBootstrap(); in AppServiceProvider.php file after that you can use paginate() method to get the records with pagination and you can display in view file using {{ $users->links() }}.

Answers 1
  • Use bootstrap pagination using appserviceprovider in laravel 8

    --PATH app\Providers\AppServiceProvider.php
    use Illuminate\Pagination\Paginator;
    public function boot()
    {
        Paginator::useBootstrap();
    
    1

    You can use bootstrap pagination in laravel 8 by just adding the provided code snippet in AppServiceProvider.php file.

  • Back to code snippet queries related laravel