Algolia autocomplete with php laravel blade

Viewed 47

tsx file I have this block of code


 params: {
                  hitsPerPage: 5,
                  attributesToSnippet: ["name:10", "desc:35"],
                  snippetEllipsisText: "…",
                  facetFilters: "college_id:1"
                }

As you see facetFilters: "college_id:1" college_id is set to 1 statically I want to make it with blade like college_id:{{$student->college->id}} dynamically how can I make this ? Is There anyway to define those params outside the algolia.tsx file ?

0 Answers
Related