Reputation: 440
Building my API
it turned out, that if I am using DELETE
or PUT
requests Laravel throws 405 Error
(Method Not Allowed)
. How to make it work?
Laravel error:
Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException The PUT method is not supported for this route. Supported methods: GET, HEAD.
Upvotes: 0
Views: 870
Reputation: 107
Laravel does support DELETE and PUT. You defined your route wrong, it only allows GET-Requests.
Route::put('/put', 'Controller@function');
Route::delete('/delete', 'Controller@function');
Upvotes: 2