sktklaus
1 year ago

Laravel Algolia Search

Posted 1 year ago by sktklaus

How can I mix this algolia template with laravel route() or asset()?

e.g. My href needs to link to a route with the ID coming from algolia

<a class="white-text" href="{{route('cases.show',result.id)}}">

                <ais-results>
                    <template scope="{ result }">
                        @{window.location.origin}
                        <a class="white-text" href="#">
                            <div class="light-blue darken-4 relative">
                                <div class="parallax-effect valign-wrapper justify-center opacity"></div>
                                
                                <div class="caption center center-align">
                                    <h5>@{{result.client_name}}</h5>
                                    <p>@{{result.created_at}}</p>
                                    <h1 cl style="margin:0">@{{result.project_name}}</h1>
                                    <p class="center case-mobile-padding" style="align-self: center;">@{{result.what_we_did}}</p>
                                </div>
                            </div>
                            <br>
                        </a>
                    </template>
                </ais-results>

Please sign in or create an account to participate in this conversation.