laravel-subscriptions
laravel-subscriptions copied to clipboard
Call to undefined method Laravelcm\Subscriptions\Models\Plan::planSubscriptions()
This error is in Model Plan,
protected static function boot(): void
{
parent::boot();
static::deleted(function (Plan $plan): void {
$plan->features()->delete();
$plan->planSubscriptions()->delete();
});
}
For solved it you only need to change
$plan->planSubscriptions()->delete();
to
$plan->subscriptions()->delete();
This error ocurred when you use $plan->delete();
method
I have the same issue in Laravel 10
I have the same issue in Laravel 10
this is the solution
For solved it you only need to change $plan->planSubscriptions()->delete(); to $plan->subscriptions()->delete(); This error ocurred when you use $plan->delete(); method
the error ocurred for de fuction name
Fix on the newest release. Thank you