-
Notifications
You must be signed in to change notification settings - Fork 67
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
Work with the specific payee (not subject's user) #42
Comments
From what I can tell the givePoint helper function (helpers.php) can set the appropriate model, but the problem is once you get into the givePoint function from HasReputations.php where it finally calls to attach to the payee() things are lost. Been scratching my head on this for a bit today trying to figure it out as not all my models will have a direct user() relationship, most are through many to many. |
In my project, I figured it out by passing a $user to these functions, ignoring payee() completely. Works like a charm! |
Would be nice to get a more elegant solution put in as a PR though to make it work as expected! |
I just added a pull request for how I did it. #43 |
Why this method adds points to the user with the id: 1, and not on which it is pointing? What's the reason of the
$user
, then?$user->givePoint(new PostCreated($post));
The text was updated successfully, but these errors were encountered: