I have a form select in blade file.
<form action="{{ Request::url() }}" method="get">
<select name="year" id="year">
<option value="2017">2017</option>
<option value="2016">2016</option>
<option value="2015">2015</option>
</select>
<input type="submit" value="Envoyer">
</form>
I need that when sending my form, the old parameters of the URL remain. I've url like that :
http://example.com/about-us?request=2d
But if I send my form, I've a URL like this :
http://example.com/about-us?year=2017
And I would like that
http://example.com/about-us?request=2d&year=2017
How can I do this in my blade file?
Thank you
You can add hidden input field:
<input type="hidden" name="request" value="{{ request('request') }}">