Laravel Spark Stripe and Filament - subscriptions per user
Hi all, I'm struggling a bit with Laravel Spark Stripe and Filament. I noticed there's the spark-billing-provider for Filament, but I think it's designed for multi-tenancy and subscriptions per tenant. I'm building a setup to do subscriptions per user.
Got the Laravel Spark integration working for the billing page and communication with Stripe. But I'm not figuring out how to check for these subscriptions, show banners below the top bar when someone is on a trial etc.
Did anyone do this before, subscriptions per user? I'm in need of a small push into the right direction π
Thanks π
Solution:Jump to solution
Update: I used a custom blade file (subscriptionBanner) for the banner and attached it using a renderHook in the panel provider. It was as simple as that in the end π
renderHook('panels::body.start',
fn () => view('subscriptionBanner'),
)
...5 Replies
You can set up multi tenancy and limit the user to have only one tenant
Might be useful in general to see what you can do, I set this up, not per user, but it's totally doable: https://silvanhagen.com/writing/free-users-filament-laravel-spark/
Silvan Hagen
Free users with Filament and Laravel Spark
How to handle free users in a multi-tenant Filament app using Laravel Spark and a custom Middleware.
On the admin panel, I use a render hook, to display the subscription status:
->renderHook('panels::global-search.before', fn (): string => Blade::render('@livewire('project.subscription-status')'))
Maybe this helps to render a banner
`
π will look into it!
Solution
Update: I used a custom blade file (subscriptionBanner) for the banner and attached it using a renderHook in the panel provider. It was as simple as that in the end π
renderHook('panels::body.start',
fn () => view('subscriptionBanner'),
)