We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Hidden input _method= PUT does not work

My Route is defined as this

[2] => Phalcon\Mvc\Router\Route Object
                                    (
                                        [_pattern:protected] => /grup/{id}/yetki/edit
                                        [_compiledPattern:protected] => #^/grup/([^/]*)/yetki/edit$#
                                        [_paths:protected] => Array
                                            (
                                                [namespace] => Resources
                                                [controller] => yetki
                                                [action] => putEdit
                                                [id] => 1
                                            )

                                        [_methods:protected] => PUT
                                        [_hostname:protected] => 
                                        [_converters:protected] => 
                                        [_id:protected] => 8
                                        [_name:protected] => /grup/{id}/yetki/putEdit
                                        [_beforeMatch:protected] => 
                                        [_group:protected] => Phalcon\Mvc\Router\Group Object
     *RECURSION*
                                    )

But for some reason I cant make PUT request from the Form that has <input type="hidden" name="_METHOD" value="PUT" />

Any help is appriciated!

Why should it work putting that in the form?

In XHTML 1.x only methods GET and POST are accepted in forms. If you need to test a request with PUT or another http method use a tool like Postman (in chrome) or RESTClient (in firefox).