So I used simple Laravel pagination command of {{$posts->links()}}
displaying 5 posts on one page.
Laravel's pagination is doing its job but it is displaying weird arrows. Refer the image below and please if someone is willing to help can ask me for codes I will share them.
Laravel Pagination is showing weird arrows
Asked Answered
welcome to SO .. did you checked you are using right bootstrap .? or not –
Aargau
Yes I have.I am doing a course on laravel so the instructor provided the bootstrap files –
Colenecoleopteran
You have devtools open, so ... use them! :-) Select the arrow on the page, find out what CSS/HTML is causing it. You're going to need to learn how to debug if you're learning to code :-) –
Artiste
It's not laravel issue. It happened from front end –
Orabelle
if its the issue from the front end how can I get to know the location where it is typed in wrong way? –
Colenecoleopteran
I think it's a legitimate question. The same happens to me in Laravel 8. It looks like there is a style problem with links() function. I tried a fresh new Laravel 8.x installation with the default bootstrap. This usually works in previous versions. For now try to generate the links manually: laravel.com/docs/8.x/pagination –
Epispastic
Here is official document that talk about it. You can check it
Inside AppServiceProvider
use Illuminate\Pagination\Paginator;
public function boot()
{
Paginator::useBootstrap();
}
Doc: https://laravel.com/docs/8.x/pagination#using-bootstrap
Sample implementation: https://www.itsolutionstuff.com/index.php/post/laravel-8-pagination-example-tutorialexample.html
This initially fixed my issue, but after I use "use WithPagination;" it messed up again. I want to use it as it reload page with ajax request. Any solutions. Thanks. –
Japha
This is the working answer, thanks. –
Byram
I put as an argument on the "links" method, a version of Bootstrap which works right:
$posts->links('pagination::bootstrap-4')
This worked for me {{$posts->links('pagination::bootstrap-5') in my case –
Dikdik
i have try this issue, is work successfuly. tank you I'm in Lomé-TOGO –
Clavicorn
Works like a charm laravel 11 –
Souter
I found the answer to this question here: i used laravel pagination links, but i got big icos. < > call in tailwind css code
You need to add this line to tailwind.config.js under content:
'./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php',
Fixed my issue with laravel 10. Thx! –
Shew
Works great with recent Laravel! –
Daystar
© 2022 - 2024 — McMap. All rights reserved.