Skip to content
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

Unsupported operand types #225

Open
AnnetBloom opened this issue Aug 15, 2020 · 1 comment
Open

Unsupported operand types #225

AnnetBloom opened this issue Aug 15, 2020 · 1 comment

Comments

@AnnetBloom
Copy link

$books = Book::searchByQuery([
'multi_match' => [
'query' => 'moby dick',
'fields' => ['name^3', 'description']
]
])->paginate(10);

returns Error
Unsupported operand types
screenshot

@Abdullah-Hejazi
Copy link

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.
or make a pull request to this repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants