Support the ongoing development of Laravel.io →
Database Views Blade
Last updated 2 years ago.
0

That looks right to me.

Make sure you have the following in the provider section of your config/app.php file:

'Illuminate\Pagination\PaginationServiceProvider',

and the following in the aliases of the same file:

 'Paginator' => 'Illuminate\Support\Facades\Paginator',

In my case, I created a helper view that all views that need pagination call to render the pagination. Below is the code to my helper view:

<?php

    #<editor-fold defaultstate="collapsed" desc="SVN Revision Information">
    # ------------------------------------------------------------
    # SVN revision information:
    # @url          $URL:  $:
    # @version      $Revision:  $:
    # @editor       $Author:  $:
    # @date         $Date:  $:
    # @id           $Id:  $:
    # ------------------------------------------------------------
    # @author       jgarifuna
    # @createdDate  {date}
    # ------------------------------------------------------------
    #
    # All code (c)2014 Garinet Media Network. All Rights Reserved.
    #</editor-fold>
    if(!isset($paginator) || !$paginator) return;
?>

<!-- start pagination -->
<div class="paginator<?php if(isset($class)){ echo ' ' . $class;} ?>">
    <?php

        echo $paginator->links();
        echo $paginator->getFrom() . ' - ' . $paginator->getTo() . ' / ' . $paginator->getTotal();

    ?>
</div>
<!-- end pagination -->





Last updated 2 years ago.
0

EDIT I figured it out.

Within the app/view.php file, the pagination view was set to 'pagination' => 'pagination'. I simply set it back to 'pagination' => 'pagination::slider-3' and now it's working as normal!

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

StyleOnPC styleonpc Joined 24 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.