Custom Operator in Query Builder
I have this code:
And i get this error from it.
Argument #1 ($query) must be of type Illuminate\Database\Query\Builder, Illuminate\Database\Eloquent\Builder given
Did I do something wrong here? I followed the docs so not sure.4 Replies
change
\Illuminate\Database\Query\Builder
with
Illuminate\Database\Eloquent\Builder
I did that but got the same error
changed bothe of them? I guess you have third place with the same use? π
App\Livewire\Replenish::App\Livewire\{closure}(): Argument #1 ($query) must be of type Illuminate\Database\Eloquent\Builder, Illuminate\Database\Query\Builder given, called in /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php on line 1673
I dont have the Eloquent Builder or the Query Builder imported somewhere in that file
Looks like the first one should be \Illuminate\Database\Eloquent\Builder
and second one \Illuminate\Database\Query\Builder
. But if one of the maintainers can verify this that would be great.
Bump
If this is the right way i can make a PR for it