Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Plans Laravel Package

lacodix/laravel-plans

Laravel package to manage SaaS plans, addons, subscriptions, and optional features. Supports countable/uncountable features with limits, resets, and consumption across plans, plus translations, ordering, and metadata—billing/invoicing not included.

View on GitHub
Deep Wiki
Context7

title: Events weight: 6

Since this package doesn't care about billing, you might want to react on subscriptions and renewals. For this usecase this package fires events that you can listen for and react with e.g. creating an invoice.

PlanSubscribed

This event is fired when a new subscription is created. But also when an existing subscriptions is changed and a new plan is subscribed in it.

The event contains the subscription and if available the old subscription model

public Subscription $subscription
public ?Subscription $oldSubscription

With the subscription you can access the subscriber and the plan, and you can access all relevant price and meta data to get needed information that is needed for billing.

The old subscription is only available if the subscription was already there, identified by the slug (defaults to 'default'). If it was updated, then $oldSubscription will contain the old data like ->plan and ->meta.

PlanChanged

This event is fired when a plan is changed, e.g. when you change the price or the name or description. Sometimes you might react on it, maybe recalculations or inform users. It just contains the affected plan.

public Plan $plan

SubscriptionRenewed

This event is fired when a subscription is renewed. It will contain the subscription via with you will be able to access the subscriber and the plan and all metadata that might be needed for billing.

public Subscription $subscription

SubscriptionsRenewed

This event is only fired if you configured the renewal aggregation config(plans.aggregate_renewals) and if you use the contained artisan command for automatic renewals. If this feature is enabled, the artisan command will aggregate all renewable subscriptions by subscriber, and finally fire this event (additionally to and after the base Event SubscriptionRenewed that is still fired for each subscription). This event contains all affected subscriptions of a subscriber.

public Collection $subscriptions
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours