I have a role resource that has many, many relationships with a user. To administer the "roles", I need to send the role identifier and user ID to the server in order to remove this role from the correct user (not necessarily a registered user).
Here is what I tried, but according to docs this is not possible. I know that I can send two identifiers in uri, but my laravel backend automatically sets the resourceful route of the resource / {resourceid}, which I would like to use if possible. Is there a way to do this that I am missing?
var removeRole = function (roleid, userid) { var input =[]; input.user = userid; $http.delete('/roles/' + roleid, input).success(function (data, status) { console.log(data); }); };
javascript angularjs laravel-4
Ir1sh Feb 26 '14 at 22:52 2014-02-26 22:52
source share