Download the PHP package hoceineel/laravel-modular-subscriptions without Composer
On this page you can find all versions of the php package hoceineel/laravel-modular-subscriptions. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hoceineel/laravel-modular-subscriptions
More information about hoceineel/laravel-modular-subscriptions
Files in hoceineel/laravel-modular-subscriptions
Package laravel-modular-subscriptions
Short Description A flexible Laravel package for managing subscriptions with custom modules
License MIT
Informations about the package laravel-modular-subscriptions
Laravel Modular Subscriptions
A flexible and customizable package for managing subscriptions with modular features in Laravel applications.
Installation
-
Install the package via Composer:
-
Publish the configuration file:
-
Publish the migrations:
- Run the migrations:
Configuration
After publishing the configuration file, you can find it at config/modular-subscriptions.php. Here you can customize the model classes used by the package and define default modules if needed.
Usage
Creating a Module
Create a new module by extending the BaseModule class:
Using the Subscribable Trait
Add the Subscribable trait to your model:
Managing Subscriptions
Create a new subscription:
Check subscription status:
Cancel a subscription:
Renew a subscription:
Change subscription plan:
Managing Module Usage
Record module usage:
Check if a module can be used:
Advanced Usage
Extending Trial Periods
Ending Trial Periods
Calculating Total Usage and Pricing
Extending the Package
You can extend the functionality of this package by:
- Creating custom modules for specific features
- Extending the base models (Plan, Subscription, Module, ModuleUsage)
Testing
Run the tests with:
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security-related issues, please email [email protected] instead of using the issue tracker.
Credits
- Hoceine El Idrissi
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
Made with ❤️ by Hoceine El Idrissi