How does Laravel handle PUT requests from browsers?

后端 未结 6 1392
Happy的楠姐
Happy的楠姐 2020-12-20 12:17

I know browsers only support POST and GET requests, and Laravel supports PUT requests using the following code:



        
6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-20 12:45

    Laravel uses the symfony Http Foundation which checks for this _method variable and changes the request to either PUT or DELETE based on its contents. Yes, this happens before routing takes place.

提交回复
热议问题