Ok, so I have followed solution found here:
$(function(){
$('[data-method]').append(function(){
return "\n"+
"<form action='"+$(this).attr('href')+"' method='POST' style='display:none'>\n"+
" <input type='hidden' name='_method' value='"+$(this).attr('data-method')+"'>\n"+
"</form>\n"
})
.removeAttr('href')
.attr('style','cursor:pointer;')
.attr('onclick','$(this).find("form").submit();');
});
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community