1

Checking generated html of my laravel 5.7 app in https://validator.w3.org I got errors like :

Error: Bad value navigation for attribute role on element ul. From line 353, column 21; to line 353, column 61 <ul class="pagination" role="navigation">↩ 

Searching for similar code in my application I found several files like vendor/laravel/framework/src/Illuminate/Pagination/resources/views/bootstrap-4.blade.php with code

@if ($paginator->hasPages()) <ul class="pagination" role="navigation"> 

as this file is under /vendor directory, if there is a way to fix it for my app ?

Thanks!

1 Answer 1

2

You can run php artisan vendor:publish --tag=laravel-pagination, it will create pagination view in resources/views/vendor/pagination folder. Then you can customize and use it by adding to the first argument of links() method.

List view:

<div class="content"> @foreach($posts as $post) ..blahblah.. @endforeach </div> {{ $posts->links('vendor.pagination.view_name') }} 

More here: https://laravel.com/docs/5.7/pagination#customizing-the-pagination-view

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.