mehdi-fathi/eloquent-filter

In Your Like condition, This Dependency Block the " Delhi " word in Query show empty result but exist data

Deepakcyber opened this issue · 7 comments

test.com/api/v1/testas?a_state[like]=%Delhi% through postman show empty {
"data": []
}
but in other state show data . and all city existed only problem with delhi .
using your default condition of where like

@Deepakcyber first fix your issue later i will read it.Otherwise i have to close your issue

ver 2.3.0 when using your docs like query
test.com/api/v1/testas?a_state[like]=%Delhi%
this show empty result .. above site name changed .
but if this have test.com/api/v1/testas?a_state[like]=%Haryana% means other states from delhi
it show data . but a_state field have all state . It show Problem in only Delhi

@Deepakcyber Your problem is not related to eloquent filter. We have many unit tests for all featuers. I suggest checking your data and check the query generated.

i make normal query of like field name ad_state and this gave me data in "DELHI" but eloquent filter not give data
$employees = Bey_ad::latest()->where('ad_state', 'like', '%' .$search . '%')->limit(5)->get();
this my query gave me result . But eloquent filter not . Your Eloquet Qyery Below
return new BeyResource(Bey_ad::latest()->filter($request->except(['_token']))->with('ad_cats','ad_scats','created_by')->where('bad_status', '=', 'Approve')->get());

@Deepakcyber We don't have any problem in the like query in the eloquent filter.

@mehdi-fathi what is wrong in my query ? only block delhi word in state but show data with my normal query?? evrything done as your query