let $form = $('#update_products');
$form.on('submit', function (event) {
event.preventDefault();
let formData = new FormData($form[0]);
$.each($('.product-image-upload')[0].files, function (j, file) {
formData.append('images[' + j + ']', file);
});
$.ajax({
url: '/UpdateProduct',
type: 'post',
data: formData,
contentType: false,
cache: false,
processData: false,
success: function (data) {
console.log(data);
}
});
});<input type="file" class="product-image-upload" accept="image/*" name="images[]" id="photo1" multiple>if ($request->hasFile('images')) {
$files = $request->file('images');
} <div class="block">Текст</div>.block {
background: gray;
color: #FFF;
cursor: pointer;
transition: 3s;
}
.block:hover {
background: blue;
}svg {
fill: gray;
transition: fill 2s ease;
}
svg:hover {
fill: blue;
} body: JSON.stringify({email: email, password:password, _token: tokenHeader}).ui-selectable-helper {
margin-left: 1px;
}<div id="dialog">Иконка или "диалог"</div>
<div class="content">
Тут начальное содержимое Ваше.
</div>
<div class="test" style="display: none">
Тут содержимое диалога
</div>$('#dialog').click(function(){
$('.content').hide(); // Скрывает начальное содержимое.
$('.test').show(); // Показывает содержимое диалога.
});