samedi 12 décembre 2015

How to get variable from url in laravel 5.1?

Im using laravel 5.1. I've given my users a promocode url so they will come to my site with a url like http://ift.tt/1OnPAAq.

Within the blade itself I have a hidden input with a isset to check if that variable exists or not but when I submit the form. No data passes through to the controller for the promo.

Heres my code for the form:

<form accept-charset="UTF-8" action="{{ route('something') }}" class="something" method="post">
<input type="hidden" id="promo" autocorrect="off" autocomplete="off" value="{{ isset($promo) ? $promo : 'Default' }}">
</form>

Not sure what I've missed.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire