laravel-gamify
laravel-gamify copied to clipboard
Can't give point to User
Hi! I'm trying to give points to a user after the user registers. givePoint(new UserRegistered($user)); It does not work. Any idea?
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);