Skip to content

Work with the specific payee (not subject's user) #42

@jadamec

Description

@jadamec
$post = auth()->user()->posts()->create($request->all()); // id: 1
$user = User::find(2); // id: 2

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));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions