The database data is like this:
I want to use the having statement to get outcounts > 0
;
uses paging, sohaving
is followed by the paging functionpaginate
But this error is reported:
If Ihaving
is followed by theget()
function, then there is no problem,
You can find the data ofcounts > 0
What's going on?
Ishaving
followed by the paging functionpaginate
a 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)