cleaniquecoders/subscriptions

This package is abandoned and no longer maintained. No replacement package was suggested.

Packages for Saas web Applications. Built with Laravel Standalone Package Creator

v1.0.3 2017-02-10 16:11 UTC

This package is auto-updated.

Last update: 2023-12-03 06:57:05 UTC


README

Tell people about your package

Installation

Require the package by running the following command:

composer require cleaniquecoders/subscriptions

Open up config/app.php and add the following in the providers key:

CleaniqueCoders\Subscriptions\SubscriptionsServiceProvider::class,

Register Subscriptions Middleware in app\Http\Kernel.php

'subscription' => \CleaniqueCoders\Subscriptions\Http\Middleware\PackageSubscription::class,

Run the following command to register all the subscription routes in routes/web.php and publish the config/subscription.php, subscriptions views and seeds.

php artisan subscription:install

Usage

Seeder

Open up database/seeds/PackageSeeder.php and update your SaaS Packages accordingly and run php artisan db:seed --class=PackageSeeder.

Trait

You may add use CleaniqueCoders\Traits\Subscriptions\User as Subscription; in your User model class to enable relationship between user and subscribed package.

Middleware

Route::group(['middleware' => ['auth', 'subscription']], function () {
            Route::resource('secrets', 'YourSecretController');
});

License

This package is open-sourced software licensed under the MIT license.