-
Notifications
You must be signed in to change notification settings - Fork 403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pagination on laravel 7x not working #228
Comments
The problem is from the ElasticquentPaginator class you need to change line 25 to this: $this->lastPage = (int) ceil((int)$total / (int)$perPage); Note: don't change the vendor directly, either fork this repo and make the changes to it, then use it on your application. |
Thank you so much! @Abdullah-Hejazi |
Need to make changes to class \Elasticquent\ElasticquentResultCollection to method totalHits.
I suggest making changes /**
* Total Hits
*
* @return int
*/
public function totalHits()
{
return $this->hits['total']['value'] ?? $this->hits['total'];
} |
I'm trying #75 for pagination.
My code
I try to debug and i see variable
$total
not type int, it's is type array ['value' => 10, 'relation' => 'eq']The text was updated successfully, but these errors were encountered: