Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Apr 8, 2024

Conversation

duncanmcclean
Copy link
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.

Copy link
Member

@jasonvarga jasonvarga left a comment

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
Copy link
Member Author

duncanmcclean commented Apr 8, 2024

@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
32 checks passed
@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