A simple Laravel actions package.
composer require henrywhitaker3/laravelactions
To create a new action, run:
php artisan make:action <name>
This will create a new action in App/Actions
. You can then use the action in one of two ways:
$action = new SomeAction();
$action->run();
Or you can use the run
helper function:
run(SomeAction::class);
You can pass arguments for the action's run method as the subsequent arguments for the helper method:
run(SomeAction::class, $arg);
run(SomeAction::class, $arg1, $arg2);
MIT license. Please see the license file for more information.