Maybe this works.
php artisan route:clear
and the concat in the JS is a + not a .
url: '/galleries/heatMap/' + idGallery,
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi there, there is happening a bug in my app that isnt the first time that happen to be, i cant figure out why is doing it. I have a post request being made in a specific route, but in my app, instead making the ajax call to my specific url is send to the current url from tha page. My ajax code:
$.ajax({
method: 'POST',
async: false,
url: '/galleries/heatMap/'.idGallery,
type: 'POST',
data: {img: url, _token: token, idGallery: idGallery, productStat: productStat, tagStat: tagStat}
})
.done(function(msg){
console.log("Save HeatMap");
tagStat = {
title: "",
clicks:0,
product_id:0
};
productStat = {
clicks: 0,
product_id:0
};
}).fail(function() {
console.log("Error ocurred");
});
My current url where im making the post is: http://domain.com/models/1/embed/
And for some reason the post is being made to '../models/1/embed/', instead the url of the ajax. Does someone have a idea what is happening?
Please or to participate in this conversation.