isaeken / plugin-system
Plugin support and management library for your project
2.0
2022-06-26 17:31 UTC
Requires
- php: ^8.1
- composer/semver: ^3.3.2
- illuminate/support: ^v9.11.0
- psr/log: ^3.0
Requires (Dev)
- laravel/pint: ^0.2.0
- orchestra/testbench: ^7.5
- pestphp/pest: ^1.21
- phpunit/phpunit: ^9.4
- symfony/var-dumper: ^6.1
README
Make and add own plugins to your script and make it flexible
Features
- Execute specific function for plugin(s) at the synchronously
- Execute methods using arguments
- Enable, disable or load plugins in runtime
- Track method execution times
Installation
Install plugin-system with composer
composer require isaeken/plugin-system
Publish service provider and configs (Laravel)
php artisan vendor:publish --provider="IsaEken\PluginSystem\PluginSystemServiceProvider"
Set your configuration
// config/plugins.php <?php return [ 'directory' => base_path('plugins'), 'namespace' => '', ];
Add service provider to config/app.php
\IsaEken\PluginSystem\PluginSystemServiceProvider::class
Usage
$pluginSystem = new \IsaEken\PluginSystem\PluginSystem(); $pluginSystem->load(__DIR__ . '/plugins'); $pluginSystem->handle();
Laravel
app('plugins')->handle();
Running Tests
To run tests, run the following command
composer run test
Documentation
Feedback & Support
If you have any feedback, please reach out to us at hello@isaeken.com.tr