felloz's avatar

Argon Dashboard: Pagination Looks Bad

Hi, I'm giving a try to Argon Dashboard, the Laravel Version https://www.creative-tim.com/product/argon-dashboard-laravel

But for some reason the Laravel pagination isn't working

Im trying 2 ways to do it but neither of those works:

<nav aria-label="...">
    <ul class="pagination pagination-lg">
		 {!! $emails->links() !!}
    </ul>
</nav>
<div class="d-flex justify-content-center">
	{!! $emails->links() !!}
</div>

This is the result that I'm receiving: https://i.imgur.com/voBktCZ.png

Anyone knows what I need to do to fix that?

0 likes
3 replies
rodrigo.pedra's avatar
Level 56

Argon pagination uses bootstrap classes.

Laravel 8 uses tailwind classes by default for pagination.

Add this line to your AppServiceProvider boot method:

<?php

namespace App\Providers;

use Illuminate\Pagination\Paginator;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }

    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        Paginator::useBootstrap();
    }
}

Note: don't forget to add the import at the top.

Reference: https://laravel.com/docs/8.x/pagination#using-bootstrap

1 like

Please or to participate in this conversation.