slimphp / Slim

Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs.
http://slimframework.com
MIT License
11.98k stars 1.95k forks source link

405 Method Not Allowed #2988

Closed FvsJ101 closed 4 years ago

FvsJ101 commented 4 years ago

Hi Guys, just a quick thanks for everyone's hard work on this fantastic framework.

The issue myself and some of the guys on slim framework forum are experienceing is with the _METHOD overwrite helper.

https://discourse.slimframework.com/t/405-method-not-allowed/4282/6

Some of use are getting the problem trying to overwrite the post to put and myself is getting on the delete.

Any assistance would be greatly appreciated.

tflight commented 4 years ago

I replied over in the forums too, but have you added the Method Overriding Middleware to the routes that will need it?

https://github.com/slimphp/Slim/blob/4.x/Slim/Middleware/MethodOverrideMiddleware.php

l0gicgate commented 4 years ago

I'm closing this as resolved. The docs are clear.