Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* usage in a controlller:
* public function index($page=1) {
* $users = User::paginateUri(5, $page);
* return view('users', compact('users'));
* }
* it also support variable number of parameters,
* routes must be defined using {page} or {page?} placeholders
* $links is returned as reference and contain a standard bootstrap 3 navigation