I have a Job which runs in queue. There is a Spatie/QueryBuilder which should filter data through the filter which came with the request. I am sure the filter is in the queue as array and I also can log the filter inside the job. The job then call this code which I found on Github https://github.com/spatie/laravel-query-builder/discussions/777
$request = app(QueryBuilderRequest::class)->merge(['filter' => $this->filter]);
Log::info($request->get('filter')); // This is array('filter' => array('id' => 10))
return QueryBuilder::for(Customer::class, $request)
->where('id', '<', 20)
->toBase()
->orderByDesc('id');
The condition is like filter[id]=10 but the result returns all ids < 20. How to set up the filter to the request properly to force QueryBuilder to use it. Thanks a lot