2017 © Pedro Peláez
 

library eloquent-paginator

Adds a new paginate method to laravel eloquent that retains select statements

image

michaeljennings/eloquent-paginator

Adds a new paginate method to laravel eloquent that retains select statements

  • Thursday, July 12, 2018
  • by michaeljennings
  • Repository
  • 1 Watchers
  • 0 Stars
  • 18 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Eloquent Paginator

Eloquent is awesome, but occasionally I hit into an issue with paginating with having clauses., (*1)

This package adds a new method to the eloquent builder that retains the select statements while paginating., (*2)

Example of the bug, (*3)

Installation

Install through composer using composer require michaeljennings/eloquent-paginator or add the package to the require section of your composer.json file., (*4)

"require": {
  ...
  "michaeljennings/eloquent-paginator": "^1.0"
}

Then run composer update to install the package., (*5)

Usage

Instead of using paginate use paginateWithSelects instead., (*6)

$query->paginate(15);
$query->paginateWithSelects(15);

As the we retain the select queries from the query you cannot specify the columns like you can with the standard paginate method., (*7)

However you can still specify the paginator name and the currency page if needed., (*8)

$query->paginateWithSelects(15, 'foo', 2);

The Versions

12/07 2018

dev-master

9999999-dev

Adds a new paginate method to laravel eloquent that retains select statements

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Jennings

12/07 2018

v1.0

1.0.0.0

Adds a new paginate method to laravel eloquent that retains select statements

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Jennings