Ibrar Hussain
Posted on January 12, 2022
If you are using Laravel 8 for your application and want to use bootstrap pagination instead of the default one. Then we need to add the Paginator::useBootstrap();
in boot
function in AppServiceProvider
file.
You AppServiceProvider
file should look like this:
<?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();
}
}
After this, your application pagination will use bootstrap pagination look and feel.
💖 💪 🙅 🚩
Ibrar Hussain
Posted on January 12, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.