Set fixed facet filter, that always applies?

Hi,
I’m building an ecommerce like system with Laravel and Vue. Using Algolia for filtering and searching.

Each Product Category has its own page, with it’s own set of attribute filters (this part works fine).
I’m using one Algolia index for all Products.
Now I need to have a fixed facetFilter for the category_id, to only list products from the category you’re currently viewing.

I’ve tried something like this, but it didn’t work.

< ais-instant-search index-name=“products” :search-client=“searchClient” :routing=“routing”>
< ais-configure
:hits-per-page.camel=“4”
:facet-filters.camel="[[‘attributes.product_category_id:{{ $category->id }}’]]"
>< /ais-configure>

< /ais-instant-search>

{{ $category->id }} is comming from Laravel.

Is this the right way to go about this or is there a better way to accomplish this?
I get no errors, it just doesn’t display any products anymore (when setting :facet-filters.camel).

Hi @eminos,

Thanks for contacting Algolia! Have you seen our documentation on Apply default value to widgets using Vue?