lundi 5 février 2018

Laravel getCountForPagination() returning Object instead of int

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 ?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire