HTTP Method Spoofing for Forms

Description

Return the user-desired HTTP method, if given. Otherwise, return the CGI.REQUEST_METHOD, as usual.

See https://laravel.com/docs/5.2/routing#form-method-spoofing

This will introduce no breaking issues while making it possible for normal forms to follow RESTful routing guidelines.

HTTP Verb

Path

Handler@Action

Used For

GET

/posts

posts@index

Displays a list of all posts

GET

/posts/new

posts@new

Returns an HTML form for creating a new post

POST

/posts

posts@create

Creates a new post

GET

/posts/:id

posts@show

Displays a specific post

GET

/posts/:id/edit

posts@edit

Returns an HTML form for editing a post

PATCH/PUT

/posts/:id

posts@update

Updates a specific post

DELETE

/posts/:id

posts@destroy

Deletes a specific post

The HTMLHelper has been updated as well:

Status

Assignee

Eric Peterson

Reporter

Eric Peterson

Labels

None

Components

Fix versions

Priority

Major
Configure