I am facing a serious challenge with my application. DELETE and PUT works perfectly in the localhost but when I deploy to a server they all default to GET. As a result, I get 400 status code response. I am using angularJS and symfony.
Below are my codes
Angular:
return t.delete("projects/" + e.id).success(function() {
for (var t = 0; t < c.all.length; t++) c.all[t].id == e.id && c.all.splice(t, 1)
}).error(function(e) {
alertify.log(e, "error", 2e3)
});
Symfony Router:
$app->delete('/projects/{id}', "projects.controller:delete")- >before($loggedInFilter);