makingcg/subscription

Subscription module for all great payment gateway

dev-main 2022-04-03 12:11 UTC

This package is not auto-updated.

Last update: 2024-04-15 20:29:47 UTC


README

Installation

You can install the package via composer:

composer require VueFileManager/subscription

You can publish and run the migrations with:

php artisan vendor:publish --provider="VueFileManager\\Subscription\SubscriptionServiceProvider" --tag="subscription-migrations"
php artisan migrate

You can publish the config file with:

php artisan vendor:publish --provider="VueFileManager\\Subscription\SubscriptionServiceProvider" --tag="subscription-config"

This is the contents of the published config file:

Functions

Subscription

Get all active features under plan:

$subscription->fixedFeatures();

Get single feature under plan:

$subscription->feature('max_storage_amount');

Determine if user has subscription

$user->hasSubscription()

Record usage

$subscription->recordUsage('bandwidth', 2342);

Testing

composer test

Credits