Weave 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 Plans Laravel Package

lacodix/laravel-plans

Manage SaaS plans and addons with subscriptions, billing intervals, and countable or unlimited features like credits and tokens that auto-reset. Consume feature usage across plans in order, with translations, sorting, and metadata. No billing included.

View on GitHub
Deep Wiki
Context7

lacodix/laravel-plans is a flexible subscription and feature-management package for Laravel SaaS applications. It lets you define plans and addons, subscribe users to one or more plans with different billing intervals, and control access to optional features—either as simple on/off toggles or as countable quotas like tokens and credits that reset automatically after given intervals.

Usage can be consumed across multiple plans in a defined order, and both plans and features support translations via spatie/laravel-translatable plus custom meta data for prices, currencies, or anything your billing system needs. Billing itself is intentionally left out.

  • Subscribe to multiple plans with varying billing intervals
  • Countable and uncountable features, including "unlimited"
  • Split feature consumption across plans in order
  • Order plans, features, and subscriptions for display and logic
  • Translatable plans/features and extensible meta data
Frequently asked questions about Laravel Plans
How do I install lacodix/laravel-plans in a Laravel application?
Install it with composer require lacodix/laravel-plans; the service provider is auto-discovered. Publish and run the package migrations, then add the HasSubscriptions trait to the model that should own subscriptions, such as User, Tenant, or Team. No external services, SDKs, or credentials are required.
Does laravel-plans handle billing, invoices, and payments?
No. The package deliberately excludes invoicing, payment capture, and tax, so it is an entitlement layer rather than a billing engine. Use it beneath Stripe, Laravel Cashier, Paddle, or another invoice provider. Events such as SubscriptionRenewed give you a seam to create invoices or sync payment state in a listener.
Can a user subscribe to multiple plans or addons at the same time?
Yes. Subscriptions are modeled by slug, so a subscriber can hold a main plan plus addons with different billing intervals. Plan and subscription ordering controls how countable feature usage is consumed across plans. Credit exhaustion can flow from the primary plan into addon buckets, which is the package's main differentiator.
How do countable and uncountable features work in laravel-plans?
Uncountable features act as on/off toggles for functionality, while countable features represent credits, tokens, or similar quotas. Each plan can attach a different feature value, including unlimited, and countable values can auto-reset after configured intervals. Consumption splits usage across plans according to their order.
Is feature consumption atomic and safe under concurrent requests?
The documentation does not explicitly guarantee row locking or atomic decrements, so treat concurrent credit spending as a risk to verify. If consumption is read-modify-write across rows, concurrent requests could double-spend credits without transactions and locks. Inspect the source or run a spike using lockForUpdate or atomic updates before relying on it in production.
How are subscription renewals and feature resets triggered?
The docs do not describe an opinionated scheduler, so resets and renewals appear caller-driven. You will likely need to schedule the relevant commands or jobs and confirm they are idempotent under retry. Owning that scheduler and queue operation is part of adopting the package.
Which Laravel and PHP versions does lacodix/laravel-plans support?
The package targets modern Laravel and PHP, commonly assumed to be Laravel 10+ and PHP 8.1+, but verify the exact matrix in composer.json and the CI test workflow. It is database-agnostic Eloquent, so MySQL and PostgreSQL are both reasonable. It also composes with Spatie packages such as laravel-translatable and eloquent-sortable.
Can I use laravel-plans alongside Laravel Cashier?
You can, but both packages model subscriptions, and Cashier ships its own subscriptions table, so table and migration collisions are a real risk. Make an explicit decision that laravel-plans is the source of truth for entitlements while Cashier owns payment state, or avoid running both. Check migration naming and ordering carefully to prevent accidental coupling.
How should I handle plan changes or grandfathered pricing when editing a plan?
The package does not appear to provide plan versioning, so editing a plan's price or feature values may retroactively affect existing subscribers. Handle grandfathering by cloning plans, using meta data, or building your own versioning layer. Validate period math, proration, trial boundaries, month lengths, and DST behavior against known billing cases rather than trusting defaults.
Is lacodix/laravel-plans production-ready and what are the alternatives?
It is a 1.x package with a single maintainer, roughly 7 GitHub stars, and no visible production user base, so treat it as a bus-factor-one dependency. The repository advertises tests, PHPStan, and code-style tooling, but confirm those checks are enforced in CI rather than aspirational. Alternatives include building entitlement logic in-house or using Laravel Cashier for payment state with a separate entitlement layer, since there is no drop-in equivalent with the same credit-splitting model. Budget for building your own admin UI and CRUD because the package ships no HTTP layer.
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.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections