Instantsearchjs how to display and search using <Searchbox> globally on an ecommerce website

Im using instantsearch.js , my website is an ecommerce application in laravel and algolia is working perfect on hits page.

instant-search-react-2-01009b5d

My main question is how can I implement SearchBox in other webpages (home, static, etc) allowing people to write on header searchbox and when they press enter -> be forwarded to my search results page (eg: www.example.com/search/query?q=apple)

Taking into consideration Im using instantsearch.js completely, my controller and routes in laravel are not passing any variable into that view.

thanks in advance.

Disregard the question. for static pages or all other pages I used:

<input id="myInput" value="Some text..">
<button id="myBtn" onclick="javascript:alert('Hello World!')">Button</button>

<script>
var input = document.getElementById("myInput");
input.addEventListener("keyup", function(event) {
    event.preventDefault();
    if (event.keyCode === 13) {
        document.getElementById("myBtn").click();
    }
});
</script>