Skip to content

Commit

Permalink
Update README.md (#53)
Browse files Browse the repository at this point in the history
Correct read me parameters for givePoint helper function
  • Loading branch information
abetwothree authored Mar 6, 2023
1 parent 6eac881 commit ffbdeee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ $user->undoPoint(new PostCreated($post));
$post->delete();
```

You can also pass second argument as $user in helper function `givePoint(new PostCreated($post, $user))`, default is auth()->user().
You can also pass second argument as $user in helper function `givePoint(new PostCreated($post), $user)`, default is auth()->user().

**Pro Tip 👌** You could also hook into the Eloquent model event and give point on `created` event. Similarly, `deleted` event can be used to undo the point.

Expand Down

0 comments on commit ffbdeee

Please sign in to comment.