HTML5 specification states that <form>
should have no <form>
element descendants. Therefore you should avoid having nested forms.
I personally have the delete button as a basic button and fire the action via javascript.
echo Form::button('Delete', array('class' => 'btn btn-danger delete-btn', 'data-recordid' => $invoice->id));
$('.delete-btn').on('click', function(){
var recordID = $(this).data('recordid');
var ajax = $.ajax({
url: "/invoice/" + recordID + '/delete' ,
type: "DELETE"
})
});
Or something like that :)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community