qcod/laravel-gamify

Payee is not getting the user parameter

Opened this issue · 3 comments

Payee is not getting the user parameter

This is my function

undoPoint(new PraiseCreated($praise, $this->task->user));

Even though I pass $this->task->user the helper function is getting the authed user, so the points are going to the authed user instead of target user.

I found it by dumping dd($this->getSubject()->user); in PraiseCreated Class

$this->task->user->undoPoint(new PraiseCreated($praise));

where is $this coming from? Are you calling from inside a model?

@ghost can you share PraiseCreated implementation