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 va
you can use the same name and different value attribute for the submit buttons
// example:
{!! Form::submit( 'Save', ['class' => 'btn btn-default', 'name' => 'submitbutton', 'value' => 'save'])!!}
{!! Form::submit( 'Save draft', ['class' => 'btn btn-default', 'name' => 'submitbutton', 'value' => 'save-draft']) !!}
// Controller:
switch($request->submitbutton) {
case 'save':
//action save here
break;
case 'save-draft':
//action for save-draft here
break;
}