PHPackages                             err0r/larasub - 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. [Framework](/categories/framework)
4. /
5. err0r/larasub

ActiveLibrary[Framework](/categories/framework)

err0r/larasub
=============

Laravel Subscription Package

v3.0.0(1y ago)91.8k↓79.8%2MITPHPPHP ^8.2CI passing

Since Nov 16Pushed 12mo ago2 watchersCompare

[ Source](https://github.com/200-0K/larasub)[ Packagist](https://packagist.org/packages/err0r/larasub)[ Docs](https://github.com/err0r/larasub)[ GitHub Sponsors](https://github.com/err0r)[ RSS](/packages/err0r-larasub/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (14)Versions (23)Used By (0)

Laravel Subscription Package (Larasub)
======================================

[](#laravel-subscription-package-larasub)

[![Latest Version on Packagist](https://camo.githubusercontent.com/50afba5d40f52bb2d2ee3d85cde8ac3a54e7083715757df01c2ea0687b2b84ed/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f65727230722f6c6172617375622e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/err0r/larasub)[![Total Downloads](https://camo.githubusercontent.com/6429e453c125330a96abc82560ae6db8a826cffd15c88406ec8804bc8d7f64de/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f65727230722f6c6172617375622e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/err0r/larasub)

A powerful and flexible subscription management system for Laravel applications with comprehensive plan versioning support.

✨ Features
----------

[](#-features)

**Core Subscription Management**

- 📦 Multi-tiered subscription plans with versioning
- 🔄 Flexible billing periods (minute/hour/day/week/month/year)
- 💳 Subscribe users with custom dates and pending status
- 🔄 Cancel, resume, and renew subscriptions
- 📈 Comprehensive subscription lifecycle tracking

**Advanced Feature System**

- 🎯 Feature-based access control (consumable &amp; non-consumable)
- 📊 Usage tracking with configurable limits
- ⏰ Period-based feature resets
- 🔋 Unlimited usage support
- 🔍 Feature usage monitoring and quotas

**Plan Versioning &amp; Management**

- 📋 Plan versioning for seamless updates
- 🔄 Backward compatibility for existing subscribers
- 📅 Historical pricing and feature tracking
- 🚀 Easy rollback capabilities
- 📊 Version-specific analytics

**Developer Experience**

- 🧩 Simple trait-based integration
- ⚙️ Configurable tables and models
- 📝 Comprehensive event system
- 🔌 UUID support out of the box
- 🌐 Multi-language support (translatable plans/features)
- 🛠️ Rich builder pattern APIs

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Quick Start](#quick-start)
- [Migration from v2.x to v3.x](#migration-from-v2x-to-v3x-plan-versioning)
- [Core Concepts](#core-concepts)
- [Subscription Management](#subscription-management)
- [Feature Management](#feature-management)
- [Plan Versioning](#plan-versioning)
- [Events &amp; Lifecycle](#events--lifecycle)
- [API Resources](#api-resources)
- [Configuration](#configuration)
- [Commands](#commands)
- [Testing](#testing)
- [Contributing](#contributing)

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

[](#installation)

Install via Composer:

```
composer require err0r/larasub
```

Publish configuration:

```
php artisan vendor:publish --tag="larasub-config"
```

Run migrations:

```
# Publish all migrations
php artisan vendor:publish --tag="larasub-migrations"
php artisan migrate
```

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

[](#quick-start)

### 1. Setup Your User Model

[](#1-setup-your-user-model)

```
