muilman / processors
There is no license information available for the latest version (dev-master) of this package.
A simple package to clean up cluttered controllers.
dev-master
2015-12-09 20:18 UTC
This package is not auto-updated.
Last update: 2026-03-15 02:28:24 UTC
README
If there is one thing I hate, its cluttered controllers, to fix that problem in big applications, I came up with my own method/layer to put all the logic in: the processor layer!
Using this package is very simple! This package comes with 2 artisan commands;
processor:init- Creates the Processors folder in the App folder and 2 base classes inside the Processors folder.make:processor- Creates a an empty processor.
Calling a processor from anywhere is very simple;
- Import the processor facade at the top:
use Processor;. - Call a processor to be executed:
return Processor::init('TestProcessor', array('next' => 'home'))->function();.
Installation
Installing this package is very simple;
- Install the package with composer:
composer require muilman/processors. - Add the service provider to Config/app.php:
Muilman\Processors\ProcessorServiceProvider::class. - Optional: Add the Processors alias to the aliases in Config/app.php:
'Processor' => '\App\Processors\BaseProcessor',.