In the documentation for Pagination, under Customizing the Paginator View it says:
"This command will place the views in the resources/views/vendor/pagination directory. The default.blade.php file within this directory corresponds to the default pagination view. Simply edit this file to modify the pagination HTML."
However upon editing default.blade.php it will not update the pagination HTML. This is because the incorrect view(s) is called in IlluminatePaginatorAbstractPaginator class:
~~~
/**
* The default pagination view.
*
* @var string
*/
public static $defaultView = 'pagination::bootstrap-4';
/**
* The default "simple" pagination view.
*
* @var string
*/
public static $defaultSimpleView = 'pagination::simple-bootstrap-4';
~~~
You must edit boostrap-4.blade.php instead. This should be changed to default.blade.php as the documentation states and to avoid opinionated decisions about specific UI frameworks should Laravel use a different HTML structure in the future.
Confirmed. After upgrading to 5.6 my resources/views/vendor/pagination/default.blade.php stopped being used.
Just needs to be clarified in the docs. This was a recent change.
There are 2 solutions:
Option 1: Rename your pagination/default.blade.php to pagination/bootstrap-4.blade.php (could be confusing if you're not really using Bootstrap though)
Option 2: Add Paginator::defaultView('pagination::default'); to a service provider
In my case, I'm using UIKit so now I'm using Paginator::defaultView('pagination::uikit'); with a pagination/uikit.blade.php
This has also confused me. Why would default not be the default view it is using?
Upgrade guide only said it changed the template to BS4 but I thought it would just be updating default.blade.php (which I already override by publishing the vendor views).
Think I'll do what @fitztrev has said and make sure it always uses a certain view. Thanks.
This been updated in docs then?
I don't know, if it hasn't please make a PR to the docs.