Pagination is showing Big arrows/ Didn't work properly?

92 Views Asked by At

I used simple Laravel pagination command of {{$blogs->links()}} for blog post but showing errors. After research, I put as an argument on the "links" method, a version of Bootstrap which works right:

$posts->links('pagination::bootstrap-4')

Thank you so much!!

1

There are 1 best solutions below

0
Othmane Nemli On

Let me quote from the DOC

The links method will render the links to the rest of the pages in the result set. Each of these links will already contain the proper page query string variable. Remember, the HTML generated by the links method is compatible with the Tailwind CSS framework.

If you want to use bootstrap as your default paginator style

Add to your App\Providers\AppServiceProvider:

use Illuminate\Pagination\Paginator;
 
/**
 * Bootstrap any application services.
 */
public function boot(): void
{
    Paginator::useBootstrapFive();
    Paginator::useBootstrapFour();
}

Take a look at the doc for more details