为什么要删除laravel 5中的数据?

In Laravel 4, the data in the list can be deleted without using <form> tag. But, in laravel 5, it says we need form tag with action to delete the data . What's the reason ??

Because laravel got the method_field(method) function to emulate DELETE, PUT, PATCH method. It will create an hidden input which give the method name to laravel when the request arrives into the application.

Documentation words : "hidden input field containing the spoofed value of the form's HTTP verb." Here

{!! method_field('DELETE') !!}

Resource controller expect all method_field. To get data it's by default GET method, to save it's POST method, to update it should be PUT or PATCH and to delete DELETE field is required by the application.

http://laravel.com/docs/5.1/controllers Check out the resource routing method field list

Laravel is RESTful framework, A restful controller follows the standard blueprint for a restful resource (GET,POST,PUT/PATCH and DELETE), if you want to add delete button in your app this handy javascript code can help you for your all delete buttons code written by great jeffery way

https://gist.github.com/JeffreyWay/5112282

branches for laravel 5

https://gist.github.com/soufianeEL/3f8483f0f3dc9e3ec5d9

https://gist.github.com/ghprod/0bb7f8d207ba7838a0e6