From a00351c7f32cc57ff10bc4f7836f2985c90b51e7 Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Mon, 8 Apr 2024 18:46:31 +0100 Subject: [PATCH 1/2] Add note about using the app's default pagination view --- content/collections/docs/4-to-5.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/content/collections/docs/4-to-5.md b/content/collections/docs/4-to-5.md index 6543e30c1..58dd81c79 100644 --- a/content/collections/docs/4-to-5.md +++ b/content/collections/docs/4-to-5.md @@ -129,6 +129,24 @@ We recommend making the code changes. However, if you just want to require the p composer require laravel/helpers ``` +### Statamic will now use your app's default pagination view +**Affects apps using `paginate="true"` on Statamic's tags.** + +Previously, Statamic used the `pagination::default` view to rendering pagination links. In Statamic 5, it will use your app's default pagination view, typically `pagination::tailwind`. + +To avoid making code changes, you may wish to change the default view back to `pagination::default`: + +```php +// app/Providers/AppServiceProvider.php + +use Illuminate\Pagination\Paginator; + +public function boot(): void +{ + Paginator::defaultView('pagination::default'); +} +``` + ## Low impact changes ### Validation rule changes From 145aaddc07d0cf0f4a53e1ea1545262de5e9138e Mon Sep 17 00:00:00 2001 From: Jason Varga Date: Mon, 8 Apr 2024 14:01:47 -0400 Subject: [PATCH 2/2] Update 4-to-5.md --- content/collections/docs/4-to-5.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/collections/docs/4-to-5.md b/content/collections/docs/4-to-5.md index 58dd81c79..73fc788f4 100644 --- a/content/collections/docs/4-to-5.md +++ b/content/collections/docs/4-to-5.md @@ -130,7 +130,7 @@ composer require laravel/helpers ``` ### Statamic will now use your app's default pagination view -**Affects apps using `paginate="true"` on Statamic's tags.** +**Affects apps using the `auto_links` pagination variable in templates.** Previously, Statamic used the `pagination::default` view to rendering pagination links. In Statamic 5, it will use your app's default pagination view, typically `pagination::tailwind`. @@ -139,11 +139,11 @@ To avoid making code changes, you may wish to change the default view back to `p ```php // app/Providers/AppServiceProvider.php -use Illuminate\Pagination\Paginator; +use Illuminate\Pagination\Paginator; // [tl! ++] public function boot(): void { - Paginator::defaultView('pagination::default'); + Paginator::defaultView('pagination::default'); // [tl! ++] } ```