Skip to content

[5.x] Stop explicitly defining the pagination view, use the app's default - #9843

Merged
jasonvarga merged 2 commits into
masterfrom
use-default-paginator-view
Apr 8, 2024
Merged

jasonvarga merged 2 commits into
masterfrom
use-default-paginator-view

Conversation

@duncanmcclean

Copy link
Copy Markdown
Member

This pull request changes how we render the pagination links. Instead of always rendering the default pagination view, we'll use the whatever the default pagination view is. This allows developers to use a custom pagination view if they want.

To change the default view, add this to your AppServiceProvider's boot method:

use Illuminate\Pagination\Paginator;

public function boot(): void
{
    Paginator::defaultView('pagination::tailwind');
}

Closes #9835.

@jasonvarga jasonvarga left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change since the default is tailwind.

If you were using auto_links and you upgrade, your pagination would look different or be broken.

It's a good change though, but please target master.

@duncanmcclean
duncanmcclean changed the base branch from 4.x to master April 8, 2024 17:27
@duncanmcclean

duncanmcclean commented Apr 8, 2024

Copy link
Copy Markdown
Member Author

@jasonvarga Okay, I've updated this PR to target master instead. I'll add a note to the upgrade guide (statamic/docs#1312).

@jasonvarga jasonvarga changed the title [4.x] Stop explicitly defining the pagination view, use the app's default [5.x] Stop explicitly defining the pagination view, use the app's default Apr 8, 2024
@jasonvarga
jasonvarga merged commit 6a7dd1f into master Apr 8, 2024
@jasonvarga
jasonvarga deleted the use-default-paginator-view branch April 8, 2024 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Paginator regression between v4.48 and v4.55

2 participants