Proxied Filters #901
Unanswered
taskinbirtan
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello dear Spatie community,
I have been building a Rest-API, trying not to let go of JSON-API standards being described https://jsonapi.org/
I have been using spatie/laravel-query-builder since the beginning because I know how much effort has been put into this great repository.
I have faced a different type of problem where I have double classes let's say:
Customer::class and CustomerArchive::class models. They are both the same models; one of them targets customer table, the other is customer_archive table with the same exact properties.
Actually, customer_archive table is the source of the soft_deleted data of customer table.
So one can say API_URL/api/v1/customer?filter[trashed]=only must return the customer_archive table data.
I have used a hack to make this work like a charm.
Beta Was this translation helpful? Give feedback.
All reactions