ecoleplus/filament-subs

This is my package filament-subscriptions

v1.0.14 2024-07-13 17:00 UTC

This package is auto-updated.

Last update: 2024-09-13 20:05:09 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

Support us

If you like this package, consider supporting us by donating to support our development. Your support is greatly appreciated! 🙏

Buy Me A Coffee

Installation

You can install the package via composer:

composer require ecoleplus/filament-subs

You can publish and run the migrations with:

php artisan vendor:publish --tag="filament-subscriptions-migrations"
php artisan migrate

You can publish the config file with:

php artisan vendor:publish --tag="filament-subscriptions-config"

This is the contents of the published config file:

return [
    "currency" => " MAD",
    "model" => "App\\Models\\User",
];

Optionally, you can publish the views using

php artisan vendor:publish --tag="filament-subscriptions-views"

Usage

use EcolePlus\FilamentSubscription\FilamentSubscriptionPlugin;

...
return $panel
    ->plugins([
        FilamentSubscriptionPlugin::make(),
    ]);
use EcolePlus\FilamentSubscription\Traits\PlanSubscriptions;

class User extends Authenticatable
{
    use PlanSubscriptions;
}

You can use the trait in any model you want as long as you have set the model in the config file.

Testing

composer test

Contributing

Credits

License

The MIT License (MIT). Please see License File for more information.