PHPackages                             turahe/subscription - 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. turahe/subscription

ActiveLibrary

turahe/subscription
===================

A flexible and feature-rich subscription management system for Laravel applications

1.2.0(8mo ago)077MITPHPPHP ^8.4CI failing

Since Sep 10Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/turahe/subscription)[ Packagist](https://packagist.org/packages/turahe/subscription)[ RSS](/packages/turahe-subscription/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (6)Versions (8)Used By (0)

 [ ![Laravel v11.x](https://camo.githubusercontent.com/548926039279e0fce0773e92eaef60cea5e0254ec8192a8b42e34c5ee141d8a0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d7631312e782d464632443230) ](https://laravel.com) [ ![Build Status](https://github.com/turahe/subscription/actions/workflows/php.yml/badge.svg) ](https://github.com/turahe/subscription/actions/workflows/php.yml) [ ![Total Downloads](https://camo.githubusercontent.com/9275eec9bca4985fdac943ae6e030d9d6a02091e68d691ef79423039390d9928/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7475726168652f737562736372697074696f6e) ](https://packagist.org/packages/turahe/subscription) [ ![Packagist](https://camo.githubusercontent.com/f8a0471602a475c0cb939a1a0af4dbb4c49d5276b5d0266808c05f7bb596d890/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7475726168652f737562736372697074696f6e2e7376673f6c6162656c3d5061636b6167697374) ](https://packagist.org/packages/turahe/subscription) [ ![License](https://camo.githubusercontent.com/d1320b1834998f0ac9e38ff4653119c598dba0e92a108aa26f4308639b7543e6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7475726168652f737562736372697074696f6e2e7376673f6c6162656c3d4c6963656e7365) ](https://github.com/turahe/subscription/blob/main/LICENSE)

Laravel Subscription Package
============================

[](#laravel-subscription-package)

A flexible and feature-rich subscription management system for Laravel applications. This package provides everything you need to implement subscription-based services, SaaS applications, or any business model that requires recurring billing and plan management.

Features
--------

[](#features)

- **Plan Management**: Create and manage subscription plans with flexible pricing
- **Feature System**: Define features with usage limits and resettable periods
- **Trial Periods**: Built-in trial period support for new subscriptions
- **Grace Periods**: Configure grace periods for failed payments
- **Usage Tracking**: Track feature usage with automatic limits enforcement
- **Multiple Subscriptions**: Support for multiple subscription types per user
- **Subscription Lifecycle**: Complete subscription lifecycle management (create, renew, cancel, change plans)
- **Eloquent Integration**: Seamless integration with Laravel's Eloquent ORM
- **Soft Deletes**: Built-in soft delete support for data integrity
- **User Stamps**: Automatic tracking of who created/modified records
- **Sortable**: Built-in sorting capabilities for plans and features

Requirements
------------

[](#requirements)

- PHP 8.1+
- Laravel 11.x
- MySQL/PostgreSQL/SQLite

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

[](#installation)

1. **Install the package via Composer:**

    ```
    composer require turahe/subscription
    ```
2. **Publish the configuration and migration files:**

    ```
    php artisan vendor:publish --provider="Turahe\Subscription\SubscriptionServiceProvider"
    ```
3. **Run the migrations:**

    ```
    php artisan migrate
    ```
4. **Done!** The package is now ready to use.

Quick Start
-----------

[](#quick-start)

### 1. Add Subscription Support to Your User Model

[](#1-add-subscription-support-to-your-user-model)

```
