Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #194

    Patch and Put method are both used to update data in the database but what is the difference between these methods?

    • This topic was modified 1 year, 4 months ago by dan.

    Use patch method when if you are just updating a fraction of your information of your model. For example if your user model has name, email, and password attributes but you are only changing the name, use the patch method.

    If you are going to update all of the attributes, use the put method.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.