PHPackages                             jojostx/larasubs - 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. jojostx/larasubs

ActiveLibrary[Payment Processing](/categories/payments)

jojostx/larasubs
================

Flexible plans and subscription management system for Laravel, with the required tools to run your SAAS like services efficiently

v0.1.5(3y ago)954MITPHPPHP ^8.0|^8.1

Since Dec 1Pushed 1y ago1 watchersCompare

[ Source](https://github.com/jojostx/larasubs)[ Packagist](https://packagist.org/packages/jojostx/larasubs)[ RSS](/packages/jojostx-larasubs/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (7)Dependencies (13)Versions (11)Used By (0)

 [![Banner](./art/larasubs.png)](./art/larasubs.png)

[![Latest Version on Packagist](https://camo.githubusercontent.com/74f884a7428a13fa4b2b507d7150e0ab7bfbb5bf5b33cdc9da62b767f4bded8d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6f6a6f7374782f6c617261737562733f696e636c7564655f70726572656c6561736573)](https://packagist.org/packages/jojostx/larasubs)[![GitHub Tests Action Status](https://camo.githubusercontent.com/147c08d7f5dd92e58fc72a85f4a6f8403151fed5aa10887b74d942bf54741cf1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6a6f6a6f7374782f6c617261737562732f72756e2d7465737473)](https://github.com/jojostx/larasubs/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://github.com/jojostx/larasubs/actions/workflows/fix-code-style.yml/badge.svg)](https://github.com/jojostx/larasubs/actions?query=workflow%3Afix-code-style+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/ed21ca14abd065794d77d5f7dbe564423a7ab51682cfb674a4a5aa0067af6167/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a6f6a6f7374782f6c617261737562733f636f6c6f723d677265656e267374796c653d666c6174)](https://packagist.org/packages/jojostx/larasubs)

About
-----

[](#about)

This package provides a straightforward interface to handle subscriptions and features consumption.

Considerations
--------------

[](#considerations)

- Payments are out of scope for this package.
- You may want to extend some of the core models, in case you need to override the logic behind some helper methods like `renew()`, `cancel()` etc. E.g.: when cancelling a subscription you may want to also cancel the recurring payment attached.

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

[](#installation)

You can install the package via composer:

```
composer require jojostx/larasubs
```

Publish resources (config and migrations files):

```
php artisan vendor:publish --provider="Jojostx\Larasubs\LarasubsServiceProvider" --tag=larasubs-config

php artisan vendor:publish --provider="Jojostx\Larasubs\LarasubsServiceProvider" --tag=larasubs-migrations
```

Usage
-----

[](#usage)

To start using it, you just have to add the `Jojostx\Larasubs\Models\Concerns\HasSubscriptions` trait to your `User` model (or any model you want to have subscriptions):

```
