I updated a Laravel project to 8.x from 7.9.2. Everything works properly, except this part from the frontend, which is buggy, seems like a problem with the bootstrap maybe, do you know why? The arrows for the next and previous pages, when I use $user -> links() after I did $users = User::paginate(20); are buggy. See these pictures please, please help me:
Before updating to Laravel 8.x
After updating to Laravel 8.x
By default, Laravel-8 is using Tailwind as a CSS framework, but you can keep Bootstrap as the default CSS framework for your app if you are upgrading your app from the previous versions.
Simply add the following code in AppServiceProvider file and all set:
use Illuminate\Pagination\Paginator;
Paginator::useBootstrap(); *//this line will be in boot method*
And here is the reference link for the same: https://laravel.com/docs/8.x/upgrade#pagination-defaults
It is a modification made in Laravel 8. Laravel includes pagination views built using Bootstrap CSS, call the paginator's useBootstrap method within your AppServiceProvider. Check: https://laravel.com/docs/8.x/pagination#using-bootstrap
In App\Providers\AppServiceProvider add de following lines:
use Illuminate \ Pagination \ Paginator;
public function boot ()
{
Paginator::useBootstrap();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With