Laravel custom pagination view not working

Viewed 962

I'm using Laravel 8 with Tailwind CSS. Tried customising the default pagination view as per documentation. Published the view using php artisan vendor:publish --tag=laravel-pagination, but it is still using the default, not the published view. I also tried explicitly specifying the default view for paginator as described in the documentation, by adding Paginator::defaultView('resources/views/vendor/pagination/tailwind.blade.php'); to AppServiceProvider:boot() method. That also doesn't work. Clearing caches didn't help.

1 Answers

Turns out because I was using Livewire component for rendering the page, had to use php artisan livewire:publish --pagination instead. Which publishes the exact same file, but into livewire instead of pagination subdirectory. Which is super confusing IMHO and should be mentioned in the documentation.

Related