Retrieve Suppressed Subscription in Laravel SaaS Application Returning Null #113
Unanswered
bulentsakarya
asked this question in
Q&A
Replies: 1 comment
-
Hello! So you suppress the subscriptions while their payments are analysed and further have to "ressurrect" them, correct? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In my SaaS system written with Laravel 11, I have payment methods other than credit cards. However, since these payment methods require an approval process, I suppress the subscription status after assigning the subscription for the selected plan during the initial subscription.
Here's the related code:
To check the subscription and payment status, I wrote this middleware:
However, no matter how I write the query $subscription = $user->subscription()->withoutGlobalScope(SuppressingScope::class)->first();, the subscription value always returns null.
I can see the subscription record with the correct user ID in the database. There is no issue with the subscription assignment. Additionally, the suppressed_at value is also populated.
How can I retrieve the suppressed subscription information?
Beta Was this translation helpful? Give feedback.
All reactions