PHPackages                             lacodix/laravel-plans - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. lacodix/laravel-plans

ActiveLaravel-package[Payment Processing](/categories/payments)

lacodix/laravel-plans
=====================

A Laravel package to manage plans, features and subscriptions and track billing in your Laravel SAAS.

v1.2.0(5mo ago)5896—0%1MITPHPPHP ^8.2CI passing

Since Jul 3Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/lacodix/laravel-plans)[ Packagist](https://packagist.org/packages/lacodix/laravel-plans)[ Docs](https://github.com/lacodix/laravel-plans)[ GitHub Sponsors](https://github.com/lacodix)[ RSS](/packages/lacodix-laravel-plans/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (21)Versions (19)Used By (0)

laravel-plans
=============

[](#laravel-plans)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b1e247c0bf6249fabf1308c4bb1452ba560e93a88cedefc7c54029d4284854ca/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c61636f6469782f6c61726176656c2d706c616e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lacodix/laravel-plans)[![GitHub Tests Action Status](https://camo.githubusercontent.com/3c07f5a939f6047538f5c63656a4f640292c544d3bb2673fc2f66d18a06903d9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6c61636f6469782f6c61726176656c2d706c616e732f746573742e79616d6c3f6272616e63683d6d6173746572266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/lacodix/laravel-plans/actions?query=workflow%3Atest+branch%3Amaster)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/403829e327e4b7f4a99d7e41c605f445b3a2c7c74a4942ce2506b728fc77a5e2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6c61636f6469782f6c61726176656c2d706c616e732f7374796c652e79616d6c3f6272616e63683d6d6173746572266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/lacodix/laravel-plans/actions?query=workflow%3Astyle+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/f40ce1b9c2df2242751e9afca6bcbc7a03824b7f916ea545cb0c833478455e6f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c61636f6469782f6c61726176656c2d706c616e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lacodix/laravel-plans)

Documentation
-------------

[](#documentation)

You can find the entire documentation for this package on [our documentation site](https://www.lacodix.de/docs/laravel-plans). Including several usecases with detailed explanation.

What it does
------------

[](#what-it-does)

- Manage all **Plans** and **Addons** of your SaaS where users can subscribe to.
- **Subscribe** to one or more plans with different billing intervals.
- Manage optional **features**, if you need it. You can also stick with plans and just check for a subscribed plan.
- Offer **countable** and **uncountable** features. Use uncountable features to just enable/disable a functionality. Use countable features, for things like tokens, credits, and others. Attach different values of the feature to different plans, including "unlimited". Auto reset the values after given intervals.
- **Consume** Features as long as some amount is available. Split up usage on different plans, depending on the order of the plans.
- **Translate** your plans and features. Identify both by slug in your app, but offer it to your users localized, powered by [spatie/laravel-translatable](https://github.com/spatie/laravel-translatable)
- **Order** your plans, features (for visualisation to your users) and subscriptions (to keep control over usage order)
- Allow **meta data** in plans and subscriptions. The usage of meta data is up to you. In some usecase we take meta data to save currency or additional price information. This information can be used by a subsequent billing system.

What it doesn't
---------------

[](#what-it-doesnt)

- **Billing**. We don't create invoices or keep track on bills. Use the invoice service of your choice, doesn't matter which. Stripe, PayPal, your own software and any other. You just get events from this package, when subscriptions are created or renewed, and this can be used to trigger invoices. You are also free to wait for payment before you create the subscription or the other way round.
- **Pricing**. Yes there is a price column in the plan model, that can be used for visualisation. You also can use meta data for additional price information like we do it in some examples. But you don't need to use it. You can keep your prices in your billing system or save it separate from the plans. But indeed, if you use the price-column you can also get calculated prices for partial subscription intervals.

Installation
------------

[](#installation)

```
composer require lacodix/laravel-plans
```

Quickstart
----------

[](#quickstart)

To get familiar with all settings and possibilities, please see the more detailed examples. This is only a very quick overview how the package can work.

### Subscribers

[](#subscribers)

Add our HasSubscription Trait to any model.

```
use Lacodix\LaravelPlans\Models\Traits\HasSubscriptions;

class User extends Authenticatable {
    use HasSubscriptions;

    ...
}
```

### Plans and Features

[](#plans-and-features)

Create a Plan with Features (the latter is optional, if you don't need feature functionality).

```
use Lacodix\LaravelPlans\Enums\Interval;
use Lacodix\LaravelPlans\Models\Feature;
use Lacodix\LaravelPlans\Models\Plan;

$myPlan = Plan::create([
    'slug' => 'my-plan',
    'name' => 'My Plan', // can also be locale-array - see Feature below
    'price' => 50.0,
    'active' => true,
    'billing_interval' => Interval::MONTH,
    'billing_period' => 1,
    'meta' => [
        'price_per_token' => 0.05,
    ],
]);

$myFeature = Feature::create([
    'slug' => 'tokens',
    'name' => [
        'de' => 'Zusätzliche Tokens',
        'en' => 'Additional Tokens',
    ],
]);

$myPlan->features()->attach($myFeature, [
    'value' => 1000,
    'resettable_period' => 1,
    'resettable_interval' => Interval::MONTH,
]);
```

### Subscribe and renew

[](#subscribe-and-renew)

```
// Subscribe to multiple plans
$user->subscribe($myPlan1, 'main');
$user->subscribe($myPlan2, 'addon');

// Change Subscription
$user->subscribe($myPlan3, 'main'); // will replace myPlan1 subscription

// Renew
$user->subscriptions()->first()->renew();

// Cancel
$user->subscriptions()->first()->cancel();
```

Testing
-------

[](#testing)

```
composer test
```

Contributing
------------

[](#contributing)

Please run the following commands and solve potential problems before committing and think about adding tests for new functionality.

```
composer rector:test
composer csfixer:test
composer phpstan:test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- [lacodix](https://github.com/lacodix)
- [laravel Cameroon](https://github.com/laravelcm)

This package is inspired by [Laravel Subscriptions](https://github.com/laravelcm/laravel-subscriptions) created by Laravel Cameroon and was initially started as a fork of it. After several decisions to go different ways for subscription calculation, it was rewritten from scratch, but still contains several simple methods and other code parts of the original. So if this package doesn't fit your needs, try a look into Laravel Cameroons subscription package.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance70

Regular maintenance activity

Popularity22

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 94.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~36 days

Recently: every ~109 days

Total

15

Last Release

173d ago

Major Versions

v0.4.2 → v1.0.02024-09-15

### Community

Maintainers

![](https://www.gravatar.com/avatar/123ffce0596acef2904868164413bca95eeeaa4e2ba557b3620f11fce22cfbb7?d=identicon)[lacodix](/maintainers/lacodix)

---

Top Contributors

[![renky](https://avatars.githubusercontent.com/u/6528960?v=4)](https://github.com/renky "renky (18 commits)")[![akn999](https://avatars.githubusercontent.com/u/32234745?v=4)](https://github.com/akn999 "akn999 (1 commits)")

---

Tags

featureslaravelplansaassubscriptionlaravelsubscriptionplansaasfeatureslacodixbill

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/lacodix-laravel-plans/health.svg)

```
[![Health](https://phpackages.com/badges/lacodix-laravel-plans/health.svg)](https://phpackages.com/packages/lacodix-laravel-plans)
```

###  Alternatives

[laravelcm/laravel-subscriptions

Laravel Subscriptions is a flexible plans and subscription management system for Laravel, with the required tools to run your SAAS like services efficiently. It's simple architecture, accompanied by powerful underlying to afford solid platform for your business.

23255.0k3](/packages/laravelcm-laravel-subscriptions)[danestves/laravel-polar

A package to easily integrate your Laravel application with Polar.sh

7812.3k](/packages/danestves-laravel-polar)[outerweb/image-library

Store and link files to your models

1113.0k2](/packages/outerweb-image-library)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
