Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple views for laravel 4 pagination

I have an admin and home page with different layouts(HTML and CSS). Is there a way to have two different views for the pagination? I know how to customize but not how to create two views for pagination.

The problem is that in Laravel 4 you define your pagination view on a config file located at app/config/view.php and it does not have the option to define multiple views, just one.

like image 674
Diego Castro Avatar asked Jan 31 '26 12:01

Diego Castro


1 Answers

Paginator::setViewName()

The Paginator facade maps to Illuminate\Pagination\Environment. The pagination service provider uses this exact method to specify the view name in the config file, so just use it to overwrite the config default.

like image 108
Aken Roberts Avatar answered Feb 02 '26 01:02

Aken Roberts



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!