Created
November 14, 2021 18:38
-
-
Save leben-jp/bbce023368d9b63995aa03790102d8b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//view_countを一つカウントアップする | |
Post::find($post_id)->increment('view_count'); | |
//ポイントを50加算する | |
User::find($user_id)->increment('points', 50); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment