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

robertp1980's avatar

request() query parameter inside anoynmous component?

When i try to access query parameter with @php @endphp in my anonymous component with request()->input('parameter') or request()->query('parameter'), i get alyway null.

It is possible to access it with facade or helper, without to pass it to the component itself?

My approach is to access on a ?back=my_path for a back Button. My problem is, when i open a livewire component to edit a model, and then hit save, i get not the right back() route,, instead i get the path to model/id/edit.

Maybe someone has a better solution to solve my problem.

0 likes
1 reply

Please or to participate in this conversation.