Skip to content
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

Can't give point to User #52

Open
sahrialardians opened this issue Sep 9, 2022 · 1 comment
Open

Can't give point to User #52

sahrialardians opened this issue Sep 9, 2022 · 1 comment

Comments

@sahrialardians
Copy link

Hi!
I'm trying to give points to a user after the user registers.
givePoint(new UserRegistered($user));
It does not work.
Any idea?

@yanikkumar
Copy link

Do it this way, in UserRegister Method after creating user like this:

$user = User::create([
'email' => data['email'],
'password' => data['password'],
]);

give point after user is created like this:
$user->addPoint(100);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants