The issue arises when the application receives a webhook from Lemon Squeezy (subscription_cancelled, subscription_updated) at which point $billable is already removed. This triggers an error:
LemonSqueezy\Laravel\Events\SubscriptionCancelled::__construct(): Argument #1 ($billable) must be of type Illuminate\Database\Eloquent\Model, null given
How can I properly handle the end or removal of the subscription?
Hi!
I have a little problem as I mentioned in a title.
Currently, I have code like this:
The issue arises when the application receives a webhook from Lemon Squeezy (
subscription_cancelled
,subscription_updated
) at which point$billable
is already removed. This triggers an error:LemonSqueezy\Laravel\Events\SubscriptionCancelled::__construct(): Argument #1 ($billable) must be of type Illuminate\Database\Eloquent\Model, null given
How can I properly handle the end or removal of the subscription?