I am trying to get the number of results with
$total = $this->query->getCountForPagination();
And instead of receiving an (int) like I see on the documentation, a object(Illuminate\Database\Eloquent\Builder)
is returned
The function is called from Query/Builder.php class which returns an int .. but I think it gets converted somehow along the way.
Any reason for that ?
Use: $total = $this->query->getQuery()->getCountForPagination();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With