How to handle the data received to save it in the database Laravel and Ajax?

I’m trying to add the product with multiple images to the database without refreshing the page, I don’t get any errors on console but I see the long text which starting like this <script> Sfdump = window.Sfdump || (function (doc) { var refStyle = doc.createElement(‘style’), rxEsc = /([.*+?^${}()|\[\]\/\\])/g, idRx = /\bsf-dump-\d+-ref[012]\w+\b/, keyHint = 0 <=…

Get Author Post on author.php with AJAX

Hi I’m trying to display post by author on author.php but I can’t get the author ID. domain.com/author/user_23/ ( display post from that user ) JQuery jQuery(‘#menu_posts’).click(function(){ $.ajax({ type : ‘GET’, url : ‘/wp-admin/admin-ajax.php’, dataType : ‘html’, data : { action: ‘user_posts’ }, success : function(data){ $(‘#user-tab’).html(data); }, error: function(data){ alert(“Error!”); return false; } });…