Linux, WebDev and other…

Confirm form submit using bootbox modal for Laravel resource deletion

I’m currently playing with Laravel and it’s resourceful controllers. Resource deletion is made by DELETE request (which, by the way, is not available from HTML forms and it’s actually POST with “_method” key). So delete button must be submit button wrapped in form. I wanted to add customizable confirm question for resources deletion using bootbox plugin.


Code snipppet:

Confirm box will be displayed if “data-submit-confirm-text” attribute will be specified.

Delete button in Laravel’s Blade template:

Generated HTML output:



, , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *