Level 80
@pesilizium The issue is going to be your <x-link-button> component. What does that look like?
I have a small problem. I want to pass two variables via GET. Unfortunately, in the URL, & becomes &. As a result, the variable polnr can no longer be identified.
Here is my Blade code:
<x-link-button href="{{ route('dokument.index', ['kdnr' => $kfz->kkdnr, 'polnr' => $kfz->kpolnr]) }}">Documents</x-link-button>
This is my web.php:
Route::resource('dokument', DokumentController::class)
->only(['index', 'store', 'edit', 'update', 'create', 'destroy']);
This is my Request->query:
Symfony\Component\HttpFoundation
\
InputBag {#51 ▼
#parameters: array:2 [▼
"kdnr" => "1414"
"amp;polnr" => "8462691"
]
}
When I manually change the URL from & to &, everything works perfectly. Unfortunately, amp; is appended to the variable in my case.
Where is the error here?
I hope you can help me out.
Try changing the code to this
<x-link-button :href="route('dokument.index', ['kdnr' => $kfz->kkdnr, 'polnr' => $kfz->kpolnr])">Documents</x-link-button>
The attribute should be sent as a prop and not as a string, the string gets converted to safe output.
Please or to participate in this conversation.