PHPackages                             priana/membership - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. priana/membership

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

priana/membership
=================

Membership Laravel

03Blade

Since Jan 13Pushed 1y ago1 watchersCompare

[ Source](https://github.com/priana13/membership)[ Packagist](https://packagist.org/packages/priana/membership)[ RSS](/packages/priana-membership/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Library membership untuk laravel

Fitures
-------

[](#fitures)

- Packages
- Add users to packages
- Package transactions
- Membership expiration

Instalasi
---------

[](#instalasi)

`composer require priana/membership`

Migration
---------

[](#migration)

`php artisan migrate`

Add MBS to User Model
---------------------

[](#add-mbs-to-user-model)

```
use Priana\Membership\Traits\HasMembership;

class User extends Authenticatable
{
   use HasMembership;

```

Get My Subscriptions
--------------------

[](#get-my-subscriptions)

```
use App\Models\User;
use Priana\Membership\Models\MbsPackage;
use Priana\Membership\Models\MbsSubscription;

public function getMySubscriptions () {

    $user = \App\Models\User::find(2);
    $package = MbsPackage::find(1);

    MbsSubscription::addSubscription($user , $package);

    $my_subs = $user->subscriptions;

     return $my_subs;
}

```

Is User Has Active Subscriptions
--------------------------------

[](#is-user-has-active-subscriptions)

```
$user = \App\Models\User::find(288);
$check_sub = $user->subscriptions()->active()->exists();

you can add this code to your laravel policy or to create validation on your Controller

```

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/397ca1bdfc749042a62bea050bc1849b79b93895eeaa299a0225a6b9636f5a9d?d=identicon)[priana13](/maintainers/priana13)

---

Top Contributors

[![priana13](https://avatars.githubusercontent.com/u/61894166?v=4)](https://github.com/priana13 "priana13 (26 commits)")

### Embed Badge

![Health badge](/badges/priana-membership/health.svg)

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

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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