PHPackages                             osenco/filament-subscriptions - 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. [Templating &amp; Views](/categories/templating)
4. /
5. osenco/filament-subscriptions

ActiveLibrary[Templating &amp; Views](/categories/templating)

osenco/filament-subscriptions
=============================

Manage subscriptions and feature access with customizable plans in FilamentPHP

1.0.1(1y ago)07MITPHPPHP ^8.1

Since Jan 24Pushed 1y agoCompare

[ Source](https://github.com/maukoese/filament-subscriptions)[ Packagist](https://packagist.org/packages/osenco/filament-subscriptions)[ GitHub Sponsors](https://github.com/3x1io)[ GitHub Sponsors](https://github.com/megoxv)[ RSS](/packages/osenco-filament-subscriptions/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (6)Versions (3)Used By (0)

[![Screenshot](https://raw.githubusercontent.com/tomatophp/filament-subscriptions/master/arts/megoxv-tomato-subscriptions.jpg)](https://raw.githubusercontent.com/tomatophp/filament-subscriptions/master/arts/megoxv-tomato-subscriptions.jpg)

Filament Subscriptions
======================

[](#filament-subscriptions)

[![Latest Stable Version](https://camo.githubusercontent.com/44e1f50bd637837b2c1d6c975ff3cd99863c08cd16ad7cac5f62c8619e358d46/68747470733a2f2f706f7365722e707567782e6f72672f746f6d61746f7068702f66696c616d656e742d737562736372697074696f6e732f76657273696f6e2e737667)](https://packagist.org/packages/tomatophp/filament-subscriptions)[![License](https://camo.githubusercontent.com/be38f5527046456efa3c2d805c54ececb70d64114f25a006b714dcd2f0a23ca3/68747470733a2f2f706f7365722e707567782e6f72672f746f6d61746f7068702f66696c616d656e742d737562736372697074696f6e732f6c6963656e73652e737667)](https://packagist.org/packages/tomatophp/filament-subscriptions)[![Downloads](https://camo.githubusercontent.com/70b919815561223449011151187e29b718f7e57f6115e7e500c57a9f89b5c7d6/68747470733a2f2f706f7365722e707567782e6f72672f746f6d61746f7068702f66696c616d656e742d737562736372697074696f6e732f642f746f74616c2e737667)](https://packagist.org/packages/tomatophp/filament-subscriptions)

Manage subscriptions and feature access with customizable plans in FilamentPHP

thanks for [Laravel Subscriptions](https://github.com/laravelcm/laravel-subscriptions) you can review it before use this package.

Screenshots
-----------

[](#screenshots)

[![Tenant Menu](https://raw.githubusercontent.com/tomatophp/filament-subscriptions/master/arts/tenant-menu.png)](https://raw.githubusercontent.com/tomatophp/filament-subscriptions/master/arts/tenant-menu.png)[![User Menu](https://raw.githubusercontent.com/tomatophp/filament-subscriptions/master/arts/user-menu.png)](https://raw.githubusercontent.com/tomatophp/filament-subscriptions/master/arts/user-menu.png)[![Billing Page](https://raw.githubusercontent.com/tomatophp/filament-subscriptions/master/arts/billing-page.png)](https://raw.githubusercontent.com/tomatophp/filament-subscriptions/master/arts/billing-page.png)[![Change Subscription Modal](https://raw.githubusercontent.com/tomatophp/filament-subscriptions/master/arts/change-subscription-modal.png)](https://raw.githubusercontent.com/tomatophp/filament-subscriptions/master/arts/change-subscription-modal.png)[![Plans](https://raw.githubusercontent.com/tomatophp/filament-subscriptions/master/arts/plans.png)](https://raw.githubusercontent.com/tomatophp/filament-subscriptions/master/arts/plans.png)[![Edit Plan](https://raw.githubusercontent.com/tomatophp/filament-subscriptions/master/arts/edit-plan.png)](https://raw.githubusercontent.com/tomatophp/filament-subscriptions/master/arts/edit-plan.png)[![Create Feature](https://raw.githubusercontent.com/tomatophp/filament-subscriptions/master/arts/create-feature.png)](https://raw.githubusercontent.com/tomatophp/filament-subscriptions/master/arts/create-feature.png)[![Features](https://raw.githubusercontent.com/tomatophp/filament-subscriptions/master/arts/features.png)](https://raw.githubusercontent.com/tomatophp/filament-subscriptions/master/arts/features.png)[![Subscriptions](https://raw.githubusercontent.com/tomatophp/filament-subscriptions/master/arts/subscriptions.png)](https://raw.githubusercontent.com/tomatophp/filament-subscriptions/master/arts/subscriptions.png)[![Create Subscription](https://raw.githubusercontent.com/tomatophp/filament-subscriptions/master/arts/create-subscription.png)](https://raw.githubusercontent.com/tomatophp/filament-subscriptions/master/arts/create-subscription.png)[![Cancel Modal](https://raw.githubusercontent.com/tomatophp/filament-subscriptions/master/arts/cancel-modal.png)](https://raw.githubusercontent.com/tomatophp/filament-subscriptions/master/arts/cancel-modal.png)

Features
--------

[](#features)

- Manage plans
- Manage features
- Manage subscriptions
- multi-tenancy support
- Native Filament subscriptions support
- Subscription Middleware
- Subscription Page like Spark
- Subscription Events
- Subscription Facade Hook
- Subscription Webhooks
- Subscription Payments Integrations

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

[](#installation)

```
composer require tomatophp/filament-subscriptions
```

we need the Media Library plugin to be installed and migrated you can use this command to publish the migration

```
php artisan vendor:publish --provider="Spatie\MediaLibrary\MediaLibraryServiceProvider" --tag="medialibrary-migrations"
```

now you need to publish your migrations

```
php artisan vendor:publish --provider="Laravelcm\Subscriptions\SubscriptionServiceProvider"
```

after that please run this command

```
php artisan filament-subscriptions:install
```

finally register the plugin on `/app/Providers/Filament/AdminPanelProvider.php`

```
->plugin(\TomatoPHP\FilamentSubscriptions\FilamentSubscriptionsPlugin::make())
```

Using
-----

[](#using)

now on your User.php model or any auth model you like you need to add this trait

```
namespace App\Models;

use Laravelcm\Subscriptions\Traits\HasPlanSubscriptions;
use Illuminate\Foundation\Auth\User as Authenticatable;

class User extends Authenticatable
{
    use HasPlanSubscriptions;
}
```

To configure the billing provider for your application, use the `FilamentSubscriptionsProvider`:

```
use TomatoPHP\FilamentSubscriptions\FilamentSubscriptionsProvider;
use TomatoPHP\FilamentSubscriptions\Filament\Pages\Billing;
use Filament\Panel;

public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->pages([
            Billing::class
        ])
        ->tenantBillingProvider(new FilamentSubscriptionsProvider());
}
```

This setup allows users to manage their billing through a link in the tenant menu.

Requiring a Subscription
------------------------

[](#requiring-a-subscription)

To enforce a subscription requirement for any part of your application, use the `requiresTenantSubscription()` method:

```
use Filament\Panel;

public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->requiresTenantSubscription();
}
```

Users without an active subscription will be redirected to the billing page.

Register New Subscriber Type
----------------------------

[](#register-new-subscriber-type)

you can register new subscriber type by using this code

```
use TomatoPHP\FilamentSubscriptions\Facades\FilamentSubscriptions;

public function boot()
{
    FilamentSubscriptions::register(
        \TomatoPHP\FilamentSubscriptions\Services\Contracts\Subscriber::make()
            ->name('User')
            ->model(\App\Models\User::class)
    );
}
```

Use Events
----------

[](#use-events)

we add events everywhere on the subscription process and here is the list of events

- `TomatoPHP\FilamentSubscriptions\Events\CancelPlan`
- `TomatoPHP\FilamentSubscriptions\Events\ChangePlan`
- `TomatoPHP\FilamentSubscriptions\Events\RequestPlan`
- `TomatoPHP\FilamentSubscriptions\Events\SubscribePlan`

all events have the same payload

```
return [
    "old" => //Plan,
    "new" => //Plan,
    "subscription" => //Subscription,
]
```

Use Facade Hook
---------------

[](#use-facade-hook)

you can use the facade hook to add your custom logic to the subscription process

```
use TomatoPHP\FilamentSubscriptions\Facades\FilamentSubscriptions;

FilamentSubscriptions::afterSubscription(function (array $data){
    // your logic here
});

FilamentSubscriptions::afterRenew(function (array $data){
    // your logic here
});

FilamentSubscriptions::afterChange(function (array $data){
    // your logic here
});

FilamentSubscriptions::afterCanceling(function (array $data){
    // your logic here
});
```

Publish Assets
--------------

[](#publish-assets)

you can publish config file by use this command

```
php artisan vendor:publish --tag="filament-subscriptions-config"
```

you can publish views file by use this command

```
php artisan vendor:publish --tag="filament-subscriptions-views"
```

you can publish languages file by use this command

```
php artisan vendor:publish --tag="filament-subscriptions-lang"
```

Other Filament Packages
-----------------------

[](#other-filament-packages)

Checkout our [Awesome TomatoPHP](https://github.com/tomatophp/awesome)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance42

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~11 days

Total

2

Last Release

468d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1e4a04231f4571a99a35c6e8acb096b5cfd7a28eb73b71e026f2024f353fdaca?d=identicon)[maukoese](/maintainers/maukoese)

---

Top Contributors

[![fadymondy](https://avatars.githubusercontent.com/u/11937812?v=4)](https://github.com/fadymondy "fadymondy (16 commits)")[![megoxv](https://avatars.githubusercontent.com/u/87904671?v=4)](https://github.com/megoxv "megoxv (7 commits)")[![maukoese](https://avatars.githubusercontent.com/u/14233942?v=4)](https://github.com/maukoese "maukoese (4 commits)")[![YSRoot](https://avatars.githubusercontent.com/u/11317245?v=4)](https://github.com/YSRoot "YSRoot (3 commits)")[![hkmakwana12](https://avatars.githubusercontent.com/u/102182113?v=4)](https://github.com/hkmakwana12 "hkmakwana12 (2 commits)")[![jvkassi](https://avatars.githubusercontent.com/u/3010867?v=4)](https://github.com/jvkassi "jvkassi (1 commits)")[![ejjaquet](https://avatars.githubusercontent.com/u/1112498?v=4)](https://github.com/ejjaquet "ejjaquet (1 commits)")

---

Tags

phplaraveltemplate

### Embed Badge

![Health badge](/badges/osenco-filament-subscriptions/health.svg)

```
[![Health](https://phpackages.com/badges/osenco-filament-subscriptions/health.svg)](https://phpackages.com/packages/osenco-filament-subscriptions)
```

###  Alternatives

[tomatophp/filament-subscriptions

Manage subscriptions and feature access with customizable plans in FilamentPHP

628.1k](/packages/tomatophp-filament-subscriptions)[tomatophp/filament-wallet

Account Balance / Wallets Manager For FilamentPHP and Filament Account Builder

3528.5k2](/packages/tomatophp-filament-wallet)[tomatophp/filament-plugins

Manage your modules as a plugin system with plugin generator

644.7k2](/packages/tomatophp-filament-plugins)[tomatophp/filament-docs

Manage your documents and contracts all in one place with template builder

422.6k](/packages/tomatophp-filament-docs)

PHPackages © 2026

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