PHPackages                             mayakhan719/filament-saas-plugin - 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. mayakhan719/filament-saas-plugin

ActiveLibrary

mayakhan719/filament-saas-plugin
================================

Filement SaaS is a package that provides a set of tools and features to help you build multi-tenant SaaS applications using the Filament admin panel in Laravel.

11PHP

Since Jul 8Pushed 10mo agoCompare

[ Source](https://github.com/Mayakhan719/filament-saas-plugin)[ Packagist](https://packagist.org/packages/mayakhan719/filament-saas-plugin)[ RSS](/packages/mayakhan719-filament-saas-plugin/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Filament SaaS Plugin
====================

[](#filament-saas-plugin)

A Laravel + Filament plugin to add SaaS multi-tenant features like plans, subscriptions, payments, and more. This package includes both admin and client panel logic, designed to streamline multi-tenant SaaS application development using Filament.

Supports **PSR-4 Autoloading**, **PSR-12 Coding Standards**, and is designed to work within Laravel's service container and event systems.

---

[![Alt text](ss/Plans.PNG)](ss/Plans.PNG)[![Alt text](ss/Subscription.PNG)](ss/Subscription.PNG)[![Alt text](ss/Payment%20Gatways.PNG)](ss/Payment%20Gatways.PNG)[![Alt text](ss/Payment%20selection.PNG)](ss/Payment%20selection.PNG)

📦 Installation
--------------

[](#-installation)

### 1. Laravel Subscriptions Library

[](#1-laravel-subscriptions-library)

Install Laravel Subscriptions:
GitHub: [laravelcm/laravel-subscriptions](https://github.com/laravelcm/laravel-subscriptions)

```
composer require laravelcm/laravel-subscriptions
php artisan vendor:publish --provider="Laravelcm\Subscriptions\SubscriptionServiceProvider"
php artisan migrate
```

### 2. Spatie Media Library

[](#2-spatie-media-library)

Used for managing media uploads (e.g., plan images, user uploads) GitHub: spatie/laravel-medialibrary

```
composer require spatie/laravel-medialibrary
php artisan vendor:publish --provider="Spatie\MediaLibrary\MediaLibraryServiceProvider" --tag="medialibrary-migrations"
php artisan migrate
```

### 3. Filament SaaS Plugin

[](#3-filament-saas-plugin)

```
composer require maya/filament-saas-plugin
php artisan vendor:publish --provider="Maya\FilamentSaasPlugin\FilamentSaasPluginServiceProvider"
```

### 🧩 Panel Setup

[](#-panel-setup)

Admin Panel Provider Add the following to your Admin PanelProvider:

```
->plugin(new FilamentSaasAdminPlugin)
```

Includes: ✅ Subscription Resource

✅ Payment Resource (with gateway relation manager)

✅ Plan Resource (with features relation manager)

⚠️ Do not include -&gt;login() or -&gt;register() in the super admin panel.

Client Panel Provider Add the following to your Client PanelProvider:

```
->plugin(new FilamentSaasClientPlugin)
```

Includes:

✅ Billing &amp; Payment pages

✅ Livewire components for subscription and payment

✅ Middleware for subscription checks

✅ Custom single-page login

👤 The client panel is meant to be the default panel.

### 💳 Payment Integration

[](#-payment-integration)

Inside App\\Providers\\AppServiceProvider → boot() method, define the following:

```
FilamentSubscriptions::beforeSubscription(function ($data) {
    $this->PaymentPage($data, SubscribePlan::class);
});
FilamentSubscriptions::beforeRenew(function ($data) {
    $this->PaymentPage($data, RenewPlan::class);
});
FilamentSubscriptions::beforeChange(function ($data) {
    $this->PaymentPage($data, ChangePlan::class);
});
```

And define the PaymentPage() method:

```
private function PaymentPage($data, $event)
{
    return redirect()->to(
        FilamentPayments::pay(
            data: PaymentRequest::make(Plan::class)
                ->model_id($data['new']->id)
                ->team_id($data['team_id'])
                ->event($event)
                ->currency('USD')
                ->amount($data['new']->price)
                ->details('Subscription Payment')
                ->success_url(url('/client'))
                ->cancel_url(url('/client'))
                ->customer(
                    PaymentCustomer::make('John Doe')
                        ->email('john@gmail.com')
                        ->mobile('+201207860084')
                )
                ->billing_info(
                    PaymentBillingInfo::make('123 Main St')
                        ->area('Downtown')
                        ->city('Cairo')
                        ->state('Cairo')
                        ->postcode('12345')
                        ->country('EG')
                )
                ->shipping_info(
                    PaymentShippingInfo::make('123 Main St')
                        ->area('Downtown')
                        ->city('Cairo')
                        ->state('Cairo')
                        ->postcode('12345')
                        ->country('EG')
                )
        )
    );
}
```

### 🔔 After Payment Callback

[](#-after-payment-callback)

After a successful payment, you may:

Send database or broadcast notifications

Notify all super admins

Example:

```
$super_admins = User::where('is_super', true)->get();
```

### 👤 User Model Setup

[](#-user-model-setup)

In your User.php model:

```
use Maya\FilamentSaasPlugin\Contracts\SaasUser;
use Maya\FilamentSaasPlugin\Traits\HasSaasFeatures;

class User extends Authenticatable implements SaasUser
{
    use HasSaasFeatures;

    protected $fillable = [
        'is_super',
        'latest_team_id',
    ];
}
```

### 🧑‍🤝‍🧑 Team Model Setup

[](#‍‍-team-model-setup)

Create your Team.php model and extend from the base model:

```
use Maya\FilamentSaasPlugin\Models\Team as BaseTeam;

class Team extends BaseTeam
{
    // Add additional relations if needed
}
```

To support multi-tenancy, configure the necessary relations in this model. 📖 See Filament Multi-Tenancy Docs

✅ Features Summary ✔ Admin &amp; Client panel plugins

✔ Payment integration hooks

✔ Subscription lifecycle events

✔ Filament Resources for Plans, Features, Subscriptions

✔ Media uploads (via Spatie)

✔ Laravel Subscriptions Support

✔ Multi-tenancy ready

✔ Super admin control

📚 Resources Laravel:

FilamentPHP:

Laravel Subscriptions:

Spatie Media Library:

📄 License The MIT License (MIT). Please see the LICENSE file for more information.

```
Let me know if you'd like the corresponding `composer.json`, a `CONTRIBUTING.md`, or GitHub Actions CI/CD workflow example to go along with it.
```

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity14

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/69f7e07d8e632b38168063723ba69e86198b034945fb1bb9005c5f66df0f7fa3?d=identicon)[Mayakhan719](/maintainers/Mayakhan719)

---

Top Contributors

[![Mayakhan719](https://avatars.githubusercontent.com/u/71120511?v=4)](https://github.com/Mayakhan719 "Mayakhan719 (3 commits)")

### Embed Badge

![Health badge](/badges/mayakhan719-filament-saas-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/mayakhan719-filament-saas-plugin/health.svg)](https://phpackages.com/packages/mayakhan719-filament-saas-plugin)
```

PHPackages © 2026

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