You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thank you for building such an amazing package, I found it very useful for simple projects but I'm currently working on something with numerous relations.
I have a model and I can get all the data when using GET /users
return QueryBuilder::for(User::class)
->allowedFilters(['name', 'id'])
->get();
But I can''t get past this as using a simple filter like GET /users?filter[name]=John only gives me an Error: $or/$and/$nor entries need to be full objects. When using AllowedFilter, I get an empty object.
return QueryBuilder::for(User::class)
->allowedFilters([AllowedFilter::exact('name')])
->get();
Not sure if I'm just using the package incorrectly but this is the basic usage so I don't know what the conflicts might be. I'm very new to laravel and any input would be very much appreciated. Thanks!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, thank you for building such an amazing package, I found it very useful for simple projects but I'm currently working on something with numerous relations.
I have a model and I can get all the data when using GET /users
return QueryBuilder::for(User::class)
->allowedFilters(['name', 'id'])
->get();
But I can''t get past this as using a simple filter like GET /users?filter[name]=John only gives me an Error: $or/$and/$nor entries need to be full objects. When using AllowedFilter, I get an empty object.
return QueryBuilder::for(User::class)
->allowedFilters([AllowedFilter::exact('name')])
->get();
Not sure if I'm just using the package incorrectly but this is the basic usage so I don't know what the conflicts might be. I'm very new to laravel and any input would be very much appreciated. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions