I am using Laravel 5.1, and I would like to make a form with two submit buttons - Save and Save draft.
But when I post my form I have all the fields except the submit value.
I read that Laravel won't put the submit button value in the POST when the form was sent via ajax, so could you please help me how to do this?
Here are some code how it looks like now:
{!! Form::open(['url' => 'offer/create', 'method' => 'post', 'id' => 'offer-create']) !!}
....
here are my fields
....
{!! Form::submit( 'Save', ['class' => 'btn btn-default', 'name' => 'save']) !!}
{!! Form::submit( 'Save draft', ['class' => 'btn btn-default', 'name' => 'save-draft']) !!}
In my routes.php I have:
Route::controller('offer', 'OfferController');
Thanks in advance
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2bD4pVu
via IFTTT
Aucun commentaire:
Enregistrer un commentaire