skip to Main Content

I switched my laravel app from 7.25 to 8.0. Now I am facing pagination problem.

{{ $download->links() }}

in controller

$download = Download::paginate(2);

Yes, it is working well but the UI is broken now.

image error ui

3

Answers


  1. In Laravel 8 more options were added how pagination can be displayed.

    This instruction https://laravel.com/docs/8.x/pagination#using-bootstrap should help.

    Login or Signup to reply.
  2. Seems like they have made changes to the UI (bootstrap) in the latest, version.

    I would suggest you to create a custom UI for that links by yourself. Use the following commands to publish the pagination views to resource directory and make some changes accordingly.

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

    and points to your custom view with the following line of code:

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

    which is in your case {{$download->links('view.name')}}

    Login or Signup to reply.
  3. Go to AppProvidersAppServiceProvider

    add

    public function boot() { Paginator::useBootstrap(); }

    and import

    use IlluminatePaginationPaginator;

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search