Laravel 4 Pagination Error Using Twitter Bootstrap 3

When using Laravel Pagination, I believe that the generated css classes are related to bootstrap 2, not boot 3.

{{ $products->links() }} generates

 <div class="pagination"> <ul> <?php echo $presenter->render(); ?> </ul> </div> 

However, I would like it to generate:

  <ul class="pagination"> <?php echo $presenter->render(); ?> </ul> 

Without changing the code of the laravel/framework/src/illuminate/pagination/views/slider.php there a better / correct way to override CSS / code generated using {{ $products->links() }} ?

+7
twitter-bootstrap twitter-bootstrap-3 pagination laravel laravel-4
source share
3 answers

I saw something in one of the latest updates, I have not tried it, but it looks like all you have is a change:

'pagination' => 'pagination :: slider',

In the config to view:

'pagination' => 'pagination :: slider-3',

In this case, the following is used:

https://github.com/laravel/framework/blob/master/src/Illuminate/Pagination/views/slider-3.php

+11
source share

Yes, you can :) edit /app/config/view.php to specify the pagination value:

 <?php return array( 'paths' => array(__DIR__.'/../views'), 'pagination' => 'elements/pagination', ); 

after that create view/elements/pagination.php and put + change the contents of the following file: https://github.com/laravel/framework/blob/master/src/Illuminate/Pagination/views/slider.php

+6
source share

There is an update as said by "crynobone" on the laravel forum.

4.0. * @dev (to be released as 4.0.8) now includes a new view for bootstrap 3. Follow this step to use it by default

http://forums.laravel.io/viewtopic.php?id=13256

0
source share

All Articles