Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Proposal] PATCH instead of PUT #818

Closed
xtrasmal opened this issue Apr 3, 2013 · 9 comments
Closed

[Proposal] PATCH instead of PUT #818

xtrasmal opened this issue Apr 3, 2013 · 9 comments

Comments

@xtrasmal
Copy link

xtrasmal commented Apr 3, 2013

Please look at this stuff: https://speakerdeck.com/nicola/developing-restful-web-apis-with-python-flask-and-mongodb?slide=113

@taylorotwell
Copy link
Member

Post a question or real issue, not a slideshow.

@frankmayer
Copy link

@xtrasmal you have the choice, choose whatever you like. Both PUT/PATCH are handled by the update action. Strictly speaking PUT should be mapped to replace and PATCH to Update but this direction was not chosen by Taylor. See this issue (blast from the past) in the old illuminate/routing repo: illuminate/routing#20

@franzliedke
Copy link
Contributor

Taylor mentioned in that ticket that he took the same approach as Rails. This article says they do prefer PATCH for updates now.

Time to reconsider?

@xtrasmal
Copy link
Author

xtrasmal commented Apr 3, 2013

@taylorotwell I posted a slideshow, because it is quite a complete presentation of a concept. If I had a question I would have put some more time into it. Before posting it here I considered posting this at the forums, but thought this would reach the right people. Maybe you understand. So excuse my slideshow, I just wanted to add something that might have slipped somebodies mind and could have been a useful contribution.
@franzliedke thank you for the links with useful background information. I'm pleased to see that our founding farter Taylor takes on very good decisions :) Great stuff. I will close this issue.

@xtrasmal xtrasmal closed this as completed Apr 3, 2013
@franzliedke
Copy link
Contributor

I was trying to say that your suggestion should be seriously considered...

@frankmayer
Copy link

@franzliedke 's pointing to the rails article may really be a call to reconsider, @taylorotwell. Since you made your decision back then based on the rails way of things, and since laravel is still in beta, it might be better to change this sooner than later.

@frankmayer
Copy link

@xtrasmal maybe keep this issue open, so we can discuss this and it doesn't fall off the radar?

@xtrasmal xtrasmal reopened this Apr 4, 2013
@xtrasmal
Copy link
Author

xtrasmal commented Apr 4, 2013

@frankmayer Opened it in case of further discusson.
@franzliedke I might have misread. I read that Patching or Putting is something that is purely up to how you handle a UPDATE.

Reopened for dicussion.

@taylorotwell
Copy link
Member

I think we're pretty good here really. We basically take the same approach as Rails in this scenario with routing both PUT and PATCH to the update method of the resource controller.

gonzalom pushed a commit to Hydrane/tmp-laravel-framework that referenced this issue Oct 12, 2023
Using migrate:fresh instead of migrate for DatabaseMigrations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants