Git Product home page Git Product logo

laravel-pagination-with-havings's Issues

This package doesn't seem to support Laravel 5.8

When I install an error like this appears:

Problem 1 - Installation request for justbetter/laravel-pagination-with-havings ^1.0 -> satisfiable by justbetter/laravel-pagination-with-havings[1.0]. - Conclusion: remove laravel/framework v5.8.2 - Conclusion: don't install laravel/framework v5.8.2 - justbetter/laravel-pagination-with-havings 1.0 requires laravel/framework ~5.5.0|~5.6.0|~5.7.0 -> satisfiable by laravel/framework[5.5.x-dev, 5.6.x-dev, 5.7.x-dev]. - Can only install one of: laravel/framework[5.5.x-dev, v5.8.2]. - Can only install one of: laravel/framework[5.6.x-dev, v5.8.2]. - Can only install one of: laravel/framework[5.7.x-dev, v5.8.2]. - Installation request for laravel/framework (locked at v5.8.2, required as 5.8.*) -> satisfiable by laravel/framework[v5.8.2]

Doesn't work with "withCount"

Hello!
Laravel 5.8
In this case it does not work.

pays its a hasManyThrough relation.

 $orders->withCount(['pays as pay_sum' => function (Builder $q) {
                        return $q->select(DB::raw('SUM(invoice_pays.sum)'));
                    }])->havingRaw('pay_sum >= `orders`.`amount`');

Column not found: 1054 Unknown column 'orders.amount' in 'having clause'

But of course such a column exists. Everything works well without pagination.

Hello Dear, i still have the issue

I have install the package, and loaded in model

latitude;){ $longitude =$request->longitude; $doctors = DB::table("directories"); $doctors = $doctors->select("*", DB::raw("3959* acos(cos(radians(" . $latitude . ")) * cos(radians(latitude)) * cos(radians(longitude) - radians(" . $longitude . ")) + sin(radians(" .$latitude. ")) * sin(radians(latitude))) AS distance")); $doctors = $doctors->having('distance', '<', 100); $doctors = $doctors->orderBy('distance', 'asc'); $doctors =$doctors->paginate(100); } but i still have the same error, Laravle 5.7 SQLSTATE[42S22]: Column not found: 1054 Unknown column 'distance' in 'having clause' (SQL: select count(*) as aggregate from `directories` having `distance` < 100) -- ย 

Laravel 8.0

Could we please make the updates needed to support Laravel 8.0?

Thanks for the package ๐Ÿ‘

newBaseQueryBuilder Error

Hi,

Thanks for this awesome package. It works great however there is a conflict with another package that I am using.
https://github.com/jarektkaczyk/eloquence

When I add trait I get the following error.

Trait method newBaseQueryBuilder has not been applied, because there are collisions with other trait methods

The following method fixes the problem but in that case, I cant use Sofa/Eloquence

    use PaginationWithHavings,Eloquence{
        PaginationWithHavings::newBaseQueryBuilder insteadof Eloquence;
    }

Any idea how to fix it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.