caneara / quest

A pseudo fuzzy-searching library for Laravel database queries.
MIT License
109 stars 15 forks source link

Not able to use with Laravel 10.0 #10

Closed jonkarrer closed 1 year ago

jonkarrer commented 1 year ago

I just booted up a fresh Laravel repo and need some fuzzy search functionality. After following the docs for using, my code looks like this.

RoutingNumber::whereFuzzy('bank_name', 'WELLS')->first();

After running, I get this error:

ArgumentCountError: Too few arguments to function Illuminate\Database\Query\Expression::getValue(), 0 passed in /home/jon/Projects/Teleforce/routing_number_lookup/vendor/caneara/quest/src/Macros/WhereFuzzy.php on line 95 and exactly 1 expected in file /home/jon/Projects/Teleforce/routing_number_lookup/vendor/laravel/framework/src/Illuminate/Database/Query/Expression.php on line 34

I then tried to use the DB facade configuration, and the same error occurred.

Here are the relavant packages in my composer.json

"require": {
    "php": "^8.1",
    "caneara/quest": "^2.0",
    "guzzlehttp/guzzle": "^7.2",
    "laravel/framework": "^10.0",
    "laravel/sanctum": "^3.2",
    "laravel/tinker": "^2.8"
},
"require-dev": {
    "fakerphp/faker": "^1.9.1",
    "laravel/pint": "^1.0",
    "laravel/sail": "^1.18",
    "mockery/mockery": "^1.4.4",
    "nunomaduro/collision": "^7.0",
    "phpunit/phpunit": "^10.1",
    "spatie/laravel-ignition": "^2.0"
},

If you need more information let me know. Thanks for the time.

mattkingshott commented 1 year ago

Hi. I’m a bit busy at the moment, but if you want to submit a PR, I’ll review it 👍🏻

mattkingshott commented 1 year ago

Fixed in v3.0.0