PHPackages                             osenco/subscriptions - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. osenco/subscriptions

ActiveLibrary[Testing &amp; Quality](/categories/testing)

osenco/subscriptions
====================

A simple, plug and play subscription package

v0.0.1-alpha(2y ago)111MITPHPPHP &gt;=8.2

Since Aug 6Pushed 2y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Laravel Subscriptions
=====================

[](#laravel-subscriptions)

Laravel subscription package

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

[](#installation)

```
composer require osenco/subscriptions
```

Setup &amp; configuration
-------------------------

[](#setup--configuration)

```
php artisan vendor:publish --provider="Osen\Subscriptions\SubscriptionsServiceProvider"
```

```
php artisan migrate
```

// OR use the install command

```
php artisan subscriptions:install
```

Usage
-----

[](#usage)

### Add trait to your user model

[](#add-trait-to-your-user-model)

```
use Osen\Subscriptions\Concerns\HasSubscriptions;

class User extends Authenticatable
{
    use HasSubscriptions; //  'Basic',
    'description' => 'Basic plan',
    'price' => 1000,
    'interval' => 'month',
    'interval_count' => 1,
    'trial_period_days' => 30,
    'active' => true,
]);
```

OR use the Plan Facade

```
use Osen\Subscriptions\Facades\Plan;

...

Plan::called('Basic')
    ->describedAs('Basic plan')
    ->pricedAt(1000)
    ->interval('month') // or interval('months', 5)
    ->trialDays(30)
    ->active()
    ->save();
```

### Subscribe a user to a plan

[](#subscribe-a-user-to-a-plan)

```
use Osen\Subscriptions\Facades\Subscription;
use Osen\Subscriptions\Facades\Subscribe;

$user = User::find(1);
$plan = Plan::find(1);

$subscription = $user->subscribeTo($plan, 1);

//OR use the Subscribe Facade for one or multiple users
$subscription = Subscribe::subscriber($user)->to($plan, 1);
$subscription = Subscribe::subscribers($userIds)->to($plan, 1);
```

#### Add grace period to subscription

[](#add-grace-period-to-subscription)

```
$subscription = $user->subscribeTo($plan, 1)->gracePeriodDays(7);
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1015d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1e4a04231f4571a99a35c6e8acb096b5cfd7a28eb73b71e026f2024f353fdaca?d=identicon)[maukoese](/maintainers/maukoese)

---

Top Contributors

[![maukoese](https://avatars.githubusercontent.com/u/14233942?v=4)](https://github.com/maukoese "maukoese (11 commits)")

---

Tags

laravelpackagesubscriptions

### Embed Badge

![Health badge](/badges/osenco-subscriptions/health.svg)

```
[![Health](https://phpackages.com/badges/osenco-subscriptions/health.svg)](https://phpackages.com/packages/osenco-subscriptions)
```

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k43.5M5.2k](/packages/larastan-larastan)[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[tehwave/laravel-achievements

Simple, elegant Achievements the Laravel way

7012.8k](/packages/tehwave-laravel-achievements)[calebdw/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

1484.6k3](/packages/calebdw-larastan)

PHPackages © 2026

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