laravel-royalty
laravel-royalty copied to clipboard
Does the package allow reduction of a user's point?
Hi, I'd like to know if I deduct from a user's point using this package. For example, say a user can exchange some of their points for some reward, I'd want to reduce their point tally by that figure. How can I achieve that using this package?
@sdkcodes Maybe a more intuitive Class or method like
$substract = Redeem::create([
'name' => 'Free Session with points',
'key' => 'redeemed-lesson',
'description' => 'Session purchased with points',
'points' => 1000,
]);
But also is it possible doing it with creating a point with a negative number?
what do you think @miracuthbert
I agree with you @gogl92, you can create a point class with a negative value, then call it where needed.
By default the points table accepts both positive and negative values.