The database data is like this:

I want to use the having statement to get outcounts > 0;
uses paging, sohavingis followed by the paging functionpaginate

But this error is reported:

If Ihavingis followed by theget()function, then there is no problem,

You can find the data ofcounts > 0

What's going on?
Ishavingfollowed by the paging functionpaginatea bug?
How to solve it?
paginate source code
paginate takes the fields in the table by default, and there are no fields in the table
counts的可换成
skip($offset)->take($limit)