I switched my laravel app from 7.25 to 8.0. Now I am facing pagination problem.
{{ $download->links() }}
in controller
$download = Download::paginate(2);
Yes, it is working well but the UI is broken now.
I switched my laravel app from 7.25 to 8.0. Now I am facing pagination problem.
{{ $download->links() }}
in controller
$download = Download::paginate(2);
Yes, it is working well but the UI is broken now.
3
Answers
In Laravel 8 more options were added how pagination can be displayed.
This instruction https://laravel.com/docs/8.x/pagination#using-bootstrap should help.
Seems like they have made changes to the UI (bootstrap) in the latest, version.
I would suggest you to create a custom UI for that links by yourself. Use the following commands to publish the pagination views to resource directory and make some changes accordingly.
php artisan vendor:publish --tag=laravel-pagination
and points to your custom view with the following line of code:
{{ $paginator->links('view.name') }}
which is in your case
{{$download->links('view.name')}}
Go to
AppProvidersAppServiceProvider
add
public function boot() { Paginator::useBootstrap(); }
and import
use IlluminatePaginationPaginator;