I need to use my API to delete some entities, I create my controller, my methods, the routes. They works fine, all the get and put/patch method works, but with the delete one I have and error throw by my Angular app who consume this api, here is the error :
DELETE (Method Not Allowed)
In my api route file I set this :
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, PATCH, DELETE');
header('Access-Control-Allow-Headers: Content-Type, X-Auth-Token, Origin, Authorization, X-HTTP-Method-Override');
Anyone know why it's not working ?
Edit:
Here is my routes (and yes the methods are in the good controller) :