Watch this tutorial on Youtube: The “Search everything” box in the navigation bar is a very common feature in modern web app. Full source code for this tutorial is available here.
First of all, the search function is the main function of this controller, and it is where the API request will hit.
We will then map the results so each of them will contain match , model and view_link .
Here is how it looks like: And our sample API response: We can now build a search bar in our front-end that calls this endpoint that looks something like this (source code available in my demo repo): This solution has a few caveats and assumptions: That’s it!