<script>
var form = document.querySelector('.form');
var request = new XMLHttpRequest();
form.addEventListener('submit', function(e){
e.preventDefault();
var formdata = new FormData(form);
request.open('post', 'http://website.loc/admin/addimgs{{$post->id}}');
request.send(formdata);
}, false);
</script>