Код: Выделить всё
$('#petition-form').on('submit', function(e) {
e.preventDefault();
var formdata = new FormData($(this)[0]);
formdata.append('content', tinymce.get('content').getContent());
$.ajax({
url: $(this).attr('action'),
data: formdata,
processData: false,
contentType: false,
cache: false,
method: 'POST'
}).done(function(response) {
window.location.href = response.slug;
}).fail(function(response) {
$(this).append(parseJSON(response));
// var getError = $.parseJSON(response);
});
}):
Не могли бы вы помочь мне решить эту проблему?
Подробнее здесь: https://stackoverflow.com/questions/464 ... in-laravel