mehdi-fathi / eloquent-filter

Eloquent Filter is a package for filter data of models by the query strings. Easy to use and fully dynamic.
https://mehdi-fathi.github.io/eloquent-filter/
MIT License
430 stars 43 forks source link

Where Like %admin% Not Working #207

Open sunghangga opened 9 months ago

sunghangga commented 9 months ago

Bug description "where like" query doesn't work only for word %admin% . I have sent directly sql query to database with "select * from users like '%admin%'" and it will show users contains "admin" in the name, but not with eloquent-filter.

Step to reproduce Steps to reproduce the behavior:

  1. Do request with "where like" params, for example: {{urll}}/api/auth/users?name[like]=%admin%.
  2. Result: no data found.

Expected behavior Data containing word "admin" appears.

mehdi-fathi commented 9 months ago

@sunghangga

Not only I didn't consider any limitation on the word but also we have strong unit tests that have to do with all types of queries. I suggest reviewing your code from scratch.