I'm currently using API Platform and its default SearchFilter and it works as intended.
However, filtering on a deep relationship between resources can be heavy by its quite long query string in the url. (I have got multiple entities like this.)
For instance I want to search every books listed in the stores of a specific country :
{url}/books?department.store.city.country.name=italy
Is there any way to edit the @ApiFilter(SearchFilter::class, properties={}) in order to get simply at the end ?
{url}/books?country_filter=italy
Thanks !
question from:
https://stackoverflow.com/questions/65881950/api-platform-aliasing-filters-for-nested-resources 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…