Closed mrlinnth closed 2 years ago
It seems to me that this package is not capable of working with MongoDB. I've been trying right now to find out why, and I locate Spatie\QueryBuilder\Filters\FiltersPartial
which construct RAW SQL query:
(...)
$sql = "LOWER({$wrappedProperty}) LIKE ?";
(...)
$query->whereRaw($sql, ["%{$value}%"]);
@weogrim yea I also concluded that this is not compatible for MongoDB models yet.
Since I am developing a REST API app, I have switched to laraveljsonapi package instead.
You may try to use illuminatech/data-provider instead.
Just ran into this issue as well, my current workaround is to use Filter::callback() or Filter::custom() instead.
Tried to search if mongodb is supported or not at old issues/discussion and couldn't find any.
Can someone help or guide me in the right direction?
I am connecting Mongo DB and want to use this package but facing issue.