PHPackages                             netbums/laravel-subscription-preset - 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. netbums/laravel-subscription-preset

ActiveLibrary[Payment Processing](/categories/payments)

netbums/laravel-subscription-preset
===================================

This is a preset for laravel subscription through stripe

v0.1.0(3y ago)572[2 PRs](https://github.com/mortenebak/laravel-subscription-preset/pulls)MITPHPPHP ^8.0

Since Jul 9Pushed 2y ago1 watchersCompare

[ Source](https://github.com/mortenebak/laravel-subscription-preset)[ Packagist](https://packagist.org/packages/netbums/laravel-subscription-preset)[ Docs](https://github.com/netbums/laravel-subscription-preset)[ RSS](/packages/netbums-laravel-subscription-preset/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (16)Versions (4)Used By (0)

Laravel Subscription Preset
===========================

[](#laravel-subscription-preset)

[![Total Downloads](https://camo.githubusercontent.com/4210bd293283b987c6b0f8bb658d359f7ee7c05abcb0b13e4d84fee91d208495/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d576f726b2d2d696e2d2d70726f67726573732d79656c6c6f77)](https://packagist.org/packages/netbums/laravel-subscription-preset)[![Total Downloads](https://camo.githubusercontent.com/4fef778f6ab95e92366cd69f8ff676d8c764789429d664517a1f69d2d1a195e3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e657462756d732f6c61726176656c2d737562736372697074696f6e2d707265736574)](https://packagist.org/packages/netbums/laravel-subscription-preset)[![Latest Stable Version](https://camo.githubusercontent.com/0984771281ef04c4631e0897bc906a5d663cfddc91757df1892b69a63a95ff29/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e657462756d732f6c61726176656c2d737562736372697074696f6e2d707265736574)](https://packagist.org/packages/netbums/laravel-subscription-preset)[![Latest Stable Version](https://camo.githubusercontent.com/856f0a70fbd50ba4b9839fe1b0328af2c3876108fbd4d4f144618591bf35db7c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6e657462756d732f6c61726176656c2d737562736372697074696f6e2d707265736574)](https://packagist.org/packages/netbums/laravel-subscription-preset)

About
-----

[](#about)

This is a Laravel Preset Package that will quickly get your app up and running with subscriptions via Stripe and Laravel Cashier.

It comes with an opinionated set of dependencies/requirements, such as Laravel Livewire, Laravel Cashier, PestPHP. It will also set up Vite to have auto-reload when changes occur to .blade.php files.

**If this package helps you in any way, consider ☕ [buying me a cup of coffee](https://github.com/sponsors/mortenebak)**

> ### Caution
>
> [](#caution)
>
> This package is intended to be used on a **FRESH** install of Laravel. Do **NOT** use on an existing Laravel, as it will override some files.

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

[](#installation)

You can install the package via composer:

```
composer require netbums/laravel-subscription-preset
```

After installing, you can run the installer by running:

### Copying the files

[](#copying-the-files)

```
php artisan laravel-subscription-preset
```

This will copy all stubs from the preset into your Laravel project.

### Install npm packages

[](#install-npm-packages)

```
npm install

```

Then run either `npm run dev` to start the Vite server or `npm run build` compile production ready assets.

### Configure .env file

[](#configure-env-file)

Next you should copy the following into your `.env` file, and set the Stripe variables with your own data:

```
CASHIER_MODEL=App\Models\User
STRIPE_KEY=pk_test_XXXXXXXXXXXXXX
STRIPE_SECRET=sk_test_XXXXXXXXXXXXXXXXXX
STRIPE_WEBHOOK_SECRET=whsec_XXXXXXXXXXXXXXXXXXXXX
CASHIER_PAYMENT_NOTIFICATION=Laravel\Cashier\Notifications\ConfirmPayment

```

Get the values for the Stripe keys in your [Stripe Dashboard](https://dashboard.stripe.com/)

### Configure Plan seeder

[](#configure-plan-seeder)

Inside `database\seeders\DatabaseSeeder.php` you should set up your Plans.

```
use App\Models\Plan;

Plan::query()->create([
    'title' => 'Pro - $99 / month',
    'slug' => 'monthly',
    'stripe_id' => 'price_XXXXXXXXXXXXX'
]);
Plan::query()->create([
    'title' => 'Pro - $999 / year',
    'slug' => 'yearly',
    'stripe_id' => 'price_XXXXXXXXXXXXX'
]);
```

Usage
-----

[](#usage)

### Using middleware

[](#using-middleware)

`subscribed` and `not.subscribed`.

### Blade directives

[](#blade-directives)

```
@if(auth()->user()->subscribed())
```

### @can directive

[](#can-directive)

Two policies exist. You can add your own custom in `\App\Policies\SubscriptionPolicy.php`

```
@can('cancel', auth()->user()->subscription())
@can('resume', auth()->user()->subscription())
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

Please see [CONTRIBUTING](https://github.com/mortenebak/.github/blob/main/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Morten Bak](https://github.com/mortenebak)
- [All Contributors](../../contributors)

The [Tall Stack](https://github.com/laravel-frontend-presets/tall) included in this preset is created by:

- [Dan Harrin](https://github.com/DanHarrin)
- [Liam Hammett](https://github.com/imliam)
- [Ryan Chandler](https://github.com/ryangjchandler)
- [Tailwind UI](https://tailwindui.com) for the default authentication and pagination views

License
-------

[](#license)

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

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

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

Unknown

Total

1

Last Release

1404d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/859aa2d7d18b4b4acb44db371de0cc291f6db7ae287fd89a0465c277b1626fd9?d=identicon)[MortenBak](/maintainers/MortenBak)

---

Top Contributors

[![mortenebak](https://avatars.githubusercontent.com/u/9462269?v=4)](https://github.com/mortenebak "mortenebak (37 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (6 commits)")

---

Tags

laravelstripecashierpresetNetbumslaravel-subscription-preset

###  Code Quality

TestsPest

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/netbums-laravel-subscription-preset/health.svg)

```
[![Health](https://phpackages.com/badges/netbums-laravel-subscription-preset/health.svg)](https://phpackages.com/packages/netbums-laravel-subscription-preset)
```

###  Alternatives

[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[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)[lanos/laravel-cashier-stripe-connect

Adds Stripe Connect functionality to Laravel's main billing package, Cashier.

84138.9k](/packages/lanos-laravel-cashier-stripe-connect)[mmanos/laravel-billing

A billing package for Laravel 4.

451.3k](/packages/mmanos-laravel-billing)[a2insights/filament-saas

Filament Saas for A2Insights

161.1k](/packages/a2insights-filament-saas)

PHPackages © 2026

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