Illuminate\Http\Request::get(): Argument #1 ($key) must be of type string, null given Laravel Spatie Query Builder
I am using this https://github.com/protonemedia/inertiajs-tables-laravel-query-builder Laravel inertia Vue Js tables in my application. It works flawlessly on my local host but once I push the code to production, I get this error saying that
Illuminate\Http\Request::get(): Argument #1 ($key) must be of type string, null given, called in /home/tiptime247/public_html/vendor/spatie/laravel-query-builder/src/QueryBuilderRequest.php on line 144
The code that is being highlighted as having an issue is ->defaultSort('name'):
Had the same issue.
Config file was not loaded from package on staging server (locally all OK).
I have no idea why this is happening.
Fixed it by publishing config: