laravel-pagination-with-havings icon indicating copy to clipboard operation
laravel-pagination-with-havings copied to clipboard

Makes it possible to use pagination with havings in queries with Laravel.

Laravel Pagination with Havings

This package is not needed anymore from Laravel 7.10.0 and up. This is fixed by Taylor Otwell with this PR: https://github.com/laravel/framework/pull/32624


This Laravel package makes it possible to use Laravel's pagination with queries which are using havings. Without it you probably get "Column not found" MySQL errors. For more information see:

  • https://github.com/laravel/framework/issues/3105
  • https://github.com/laravel/framework/pull/5515

Installation

composer require justbetter/laravel-pagination-with-havings

Usage

Just use the trait on the model.

Example

use JustBetter\PaginationWithHavings\PaginationWithHavings;

class MyModel extends Eloquent
{
    use PaginationWithHavings;

    ...
}

Ideas, bugs or suggestions?

Please create a issue or a pull request.

License

MIT

About us

We’re a innovative development agency from The Netherlands building awesome websites, webshops and web applications with Laravel and Magento. Check out our website justbetter.nl and our open source projects.


JustBetter logo