V
V
VladimirKrasnov2021-02-24 09:45:40
Laravel
VladimirKrasnov, 2021-02-24 09:45:40

Why does pagination break in Laravel 8?

The trouble with displaying pagination in laravel 8.

Everything is standard in the controller $posts = Post::simplePaginate(5);, I display pagination like this {{$posts->links()}}and everything works fine for me, but as soon as I change the method to paginate(5), porridge immediately appears in the template, it immediately works and simplePaginateand paginate, and on the whole screen the directing arrows where to scroll . I also cleared the cache, nothing helps.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Kokhan, 2021-02-24
@VladimirKrasnov

In Lara 8, the paginator is now powered by Tailwind CSS. Therefore, you need to connect it. If you want to use the bootstrap paginator, then you need to connect it, and write in the AppServiceProvider
Paginator::useBootstrap();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question