Hello, thanks for the reply.
Yes i implemented the place_id in my subscription table, the relationship works fine, User is containing the billable trait, i can cancel subscriptions just fine but i can't find a way to cancel a user's specific subscription.
This query works just fine, it returns the subscription of the place the user owns.
$subscription = Subscription::query()->active()->where([['place_id', '=', $placeID], ['user_id', '=', $user->id]])->get();
Although next
$subscription->cancelNow();
doesn't work.
It works like this as the documenation say
$user->subscription($planName)->cancelNow();
But what if the user has two same subscriptions (1 year for example) for two different places, i am trying to find a way with Laravel Cashier to cancel user's specific subscription.
Is there anything i can pass to
subscription()
like the $planName, so it can find and cancel the specific subscription i am looking for?