Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

deryckoe's avatar

Laravel Subscriptions and associated features

Hello, I'm working on my first SaaS using Laravel and added Cashier with Paddle. I'm probably overthinking this but I would like to know the best way of adding features to each plan associated with Paddle subscriptions. I'm not asking for a "solve my issue" answer. I'm asking for advice and a suggestion for a course here in Laracast that can help me to understand this better.

Thanks!

0 likes
2 replies
martinbean's avatar
Level 80

@deryckoe I’d personally use Laravel’s own first-party feature flag package, Pennant, for this. You can then define and check features based on what plan your customers are subscribed to (if any):

Feature::define('members-area', fn (User $user) => $user->subscribed());

Or define limits based on the particular plan they’re subscribed to. For example:

Feature::define('team-limit', fn (User $user) => match (true) {
    $user->subscribedToPrice('price_gold') => 10,
    $user->subscribedToPrice('price_silver') => 5,
    $user->subscribedToPrice('price_bronze') => 2,
    default => 0,
});
deryckoe's avatar

Thanks @martinbean for some reason I never got the notification about your answer and just continue trying. I ended up doing it with vanilla code, with no package. I'll take a look at Pennant. Thanks so much!

1 like

Please or to participate in this conversation.