Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

calli23's avatar

Using a search field in authenticated layout (React, Laravel, Inertia)

Hi,

I am struggling to implement a search field within a header in authenticated layout, so that it is displayed on every page. After requesting the search, I want to get displayed the search results in a dropdown list right under the search field without navigation to another page.

It wouldn't be a problem to load the data with axios and put the results in that list, but how can i do it with inertia and laravel?

For now, I am sending requests so "/search". In a search controller, I handle the search. How can I send the data to my layout no matter which page ("/home" or "/article") the user started it from?

0 likes
0 replies

Please or to participate in this conversation.