<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
michael-rubel / laravel-enhanced-pipeline example snippets
use MichaelRubel\EnhancedPipeline\Pipeline;
Pipeline::make()
->withEvents()
->withTransaction()
->send($data)
->through([
// your pipes
])
->onFailure(function ($data, $exception) {
// do something when exception caught
return $data;
})->then(function ($data) {
// do something when all pipes completed their work
return $data;
});
app(Pipeline::class)
...
(new Pipeline(app()))
...
(new Pipeline)
->setContainer(app())
...