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 -->
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!
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community