Skip to content

1.0.1 Release

Compare
Choose a tag to compare
@ihorchepurnyi ihorchepurnyi released this 12 May 09:07
· 57 commits to master since this release

Date: Thursday, May 12, 2016

Added methods to the SubscriptionModel for easily increment or decrement your subscription quantity

Example:

$user = User::findOne(1);

$user->subscription('main')->incrementQuantity();

// Add five to the subscription's current quantity...
$user->subscription('main')->incrementQuantity(5);

$user->subscription('main')->decrementQuantity();

// Subtract five to the subscription's current quantity...
$user->subscription('main')->decrementQuantity(5);

Alternatively, you may set a specific quantity using the updateQuantity method:

$user->subscription('main')->updateQuantity(10);