babenkoivan / elastic-scout-driver-plus

Extension for Elastic Scout Driver
MIT License
267 stars 52 forks source link

Expected type 'Illuminate\\Database\\Eloquent\\Model'. Found 'App\\SearchFormQueryBuilder' #103

Closed its-anish closed 2 years ago

its-anish commented 2 years ago
Software Version
PHP 8.0
Elasticsearch 7.4.2
Laravel 8.77.1
Laravel Scout 9.3
Elastic Scout Driver 2.0

Describe the bug I am trying to use a custom query builder but it is not working as expected, which is explained in the following url

To Reproduce Step 1 - Create a file in App Folder url Step 2 - Register SearchFormQueryBuilder in Model url Step 3 - >Do following in user controller. User: :searchForm()->name("wolf")-›execute()->models();

Current behavior ElasticScoutDriverPlus\Builders\SearchRequestBuilder::__construct(): Argument #2 ($model) must be of type Illuminate\Database\Eloquent\Model, App\SearchFormQueryBuilder given, called in /var/www/app/User.php

Expected behavior Should return user model.