Make and add own plugins to your script and make it flexible
- Execute specific function for plugin(s) at the synchronously
- Execute methods using arguments
- Enable, disable or load plugins in runtime
- Track method execution times
Install plugin-system with composer
composer require isaeken/plugin-system
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
$pluginSystem = new \IsaEken\PluginSystem\PluginSystem();
$pluginSystem->load(__DIR__ . '/plugins');
$pluginSystem->handle();
app('plugins')->handle();
To run tests, run the following command
composer run test
If you have any feedback, please reach out to us at hello@isaeken.com.tr