Level 6
Fixed: ´´´
<div class="input-group">
<input type="text" name="city" id="city">
<button type="submit">søk</button>
</div>
´´´
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I´m trying to get url parameters from the blade view, and it works the first request, but the url parameters has a wrong format doing the second request. Any ideas why this happens?
Blade view:
<form method="get" action="/contacts/{{ Request::get('city') }}">
<div class="input-group">
<input type="text" name="city" id="city">
<button type="submit">søk</button>
</div>
First request (works): http://laravel.dev/contacts/?city=Oslo
When i´m doing the second search, I expect the query string to be Contacts/?xxx but it adds Oslo to the url, and the request fails.
Fixed: ´´´
<div class="input-group">
<input type="text" name="city" id="city">
<button type="submit">søk</button>
</div>
´´´
Please or to participate in this conversation.