PHPackages                             michael-rubel/laravel-enhanced-pipeline - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. michael-rubel/laravel-enhanced-pipeline

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

michael-rubel/laravel-enhanced-pipeline
=======================================

Laravel Pipeline with DB transaction support, events and additional methods.

5.0.0(10mo ago)5521.0k↓29.4%4MITPHPPHP ^8.1CI passing

Since Aug 1Pushed 10mo ago3 watchersCompare

[ Source](https://github.com/michael-rubel/laravel-enhanced-pipeline)[ Packagist](https://packagist.org/packages/michael-rubel/laravel-enhanced-pipeline)[ Docs](https://github.com/michael-rubel/laravel-enhanced-pipeline)[ Fund](https://paypal.me/observername)[ RSS](/packages/michael-rubel-laravel-enhanced-pipeline/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (14)Used By (0)

[![Enhanced Pipeline in Laravel](https://user-images.githubusercontent.com/37669560/183900755-de9856b2-012e-4a56-a99f-dd46d70538be.png)](https://user-images.githubusercontent.com/37669560/183900755-de9856b2-012e-4a56-a99f-dd46d70538be.png)

Laravel Enhanced Pipeline
=========================

[](#laravel-enhanced-pipeline)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b30d2e8a83a6493f68c40ce37bab8819a681553125f65dea9d4f932c01c22d51/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d69636861656c2d727562656c2f6c61726176656c2d656e68616e6365642d706970656c696e652e7376673f7374796c653d666c61742d737175617265266c6f676f3d7061636b6167697374)](https://packagist.org/packages/michael-rubel/laravel-enhanced-pipeline)[![Total Downloads](https://camo.githubusercontent.com/2ac00860f0a48f7ea565308c4f723c4121029e074ba4fee46ba24d69c8d0bf93/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d69636861656c2d727562656c2f6c61726176656c2d656e68616e6365642d706970656c696e652e7376673f7374796c653d666c61742d737175617265266c6f676f3d7061636b6167697374)](https://packagist.org/packages/michael-rubel/laravel-enhanced-pipeline)[![Code Quality](https://camo.githubusercontent.com/088a9830d105fcdf46204eafb54257e9e87ad701be0b4d5b7f0297e8668ba0fe/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f7175616c6974792f672f6d69636861656c2d727562656c2f6c61726176656c2d656e68616e6365642d706970656c696e652e7376673f7374796c653d666c61742d737175617265266c6f676f3d7363727574696e697a6572)](https://scrutinizer-ci.com/g/michael-rubel/laravel-enhanced-pipeline/?branch=main)[![Code Coverage](https://camo.githubusercontent.com/d044e7208fc9d7276946ae886be07fc70a40415e7f25b3ebe282ef0951742113/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6d69636861656c2d727562656c2f6c61726176656c2d656e68616e6365642d706970656c696e652e7376673f7374796c653d666c61742d737175617265266c6f676f3d7363727574696e697a6572)](https://scrutinizer-ci.com/g/michael-rubel/laravel-enhanced-pipeline/?branch=main)[![GitHub Tests Action Status](https://camo.githubusercontent.com/3d0594404acbef472f95f437b97135a7fc86f8f37021ba4aaade447b5c8daa92/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d69636861656c2d727562656c2f6c61726176656c2d656e68616e6365642d706970656c696e652f72756e2d74657374732e796d6c3f6272616e63683d6d61696e267374796c653d666c61742d737175617265266c6162656c3d7465737473266c6f676f3d676974687562)](https://github.com/michael-rubel/laravel-enhanced-pipeline/actions)[![PHPStan](https://camo.githubusercontent.com/45feb7e4140c0cbccef44a7b28e28bce94a01fd6b46236cdcddef34f77202740/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d69636861656c2d727562656c2f6c61726176656c2d656e68616e6365642d706970656c696e652f7068707374616e2e796d6c3f6272616e63683d6d61696e267374796c653d666c61742d737175617265266c6162656c3d6c6172617374616e266c6f676f3d6c61726176656c)](https://github.com/michael-rubel/laravel-enhanced-pipeline/actions)

Laravel Pipeline with DB transaction support, events and additional methods.

The package requires `PHP 8.1` or higher and `Laravel 10` or higher.

---

\#StandWithUkraine
------------------

[](#standwithukraine)

[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)

Installation
------------

[](#installation)

Install the package using composer:

```
composer require michael-rubel/laravel-enhanced-pipeline
```

Usage
-----

[](#usage)

Import modified pipeline to your class:

```
use MichaelRubel\EnhancedPipeline\Pipeline;
```

Then use the 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;
    });
```

You can as well instantiate the pipeline using the service container or manually:

```
app(Pipeline::class)
    ...

(new Pipeline(app()))
    ...

(new Pipeline)
    ->setContainer(app())
    ...
```

You can use the `run` method to execute a single pipe:

```
$pipeline = Pipeline::make();

$pipeline->run(Pipe::class, $data);
```

By default, `run` uses the `handle` method in your class as an entry point, but if you use a different method name in your pipelines, you can fix that by adding code to your ServiceProvider:

```
$this->app->resolving(Pipeline::class, function ($pipeline) {
    return $pipeline->via('execute');
});
```

If you want to override the original [Pipeline](https://github.com/laravel/framework/blob/9.x/src/Illuminate/Pipeline/Pipeline.php) resolved through IoC Container, you can add binding in the ServiceProvider `register` method:

```
$this->app->singleton(\Illuminate\Pipeline\Pipeline::class, \MichaelRubel\EnhancedPipeline\Pipeline::class);
```

Transaction
-----------

[](#transaction)

Usage of `withTransaction` method will enable a [`manual DB transaction`](https://laravel.com/docs/9.x/database#manually-using-transactions) throughout the pipeline execution.

Events
------

[](#events)

Usage of `withEvents` method will enable [`Laravel Events`](https://laravel.com/docs/9.x/events#introduction) throughout the pipeline execution.

#### Available events

[](#available-events)

- [`PipelineStarted`](https://github.com/michael-rubel/laravel-enhanced-pipeline/blob/main/src/Events/PipelineStarted.php) - fired when the pipeline starts working;
- [`PipelineFinished`](https://github.com/michael-rubel/laravel-enhanced-pipeline/blob/main/src/Events/PipelineFinished.php) - fired when the pipeline finishes its work;
- [`PipeExecutionStarted`](https://github.com/michael-rubel/laravel-enhanced-pipeline/blob/main/src/Events/PipeExecutionStarted.php) - fired **before** execution of the pipe;
- [`PipeExecutionFinished`](https://github.com/michael-rubel/laravel-enhanced-pipeline/blob/main/src/Events/PipeExecutionFinished.php) - fired **after** execution of the pipe.

Testing
-------

[](#testing)

```
composer test
```

Credits
-------

[](#credits)

- [chefhasteeth](https://github.com/chefhasteeth) for base implementation of DB transaction in Pipeline.
- [rezaamini-ir](https://github.com/rezaamini-ir) for inspiration to create a pipeline with `onFailure` method. See [\#PR](https://github.com/laravel/framework/pull/42634)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance53

Moderate activity, may be stable

Popularity40

Moderate usage in the ecosystem

Community14

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 97.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~105 days

Recently: every ~221 days

Total

11

Last Release

329d ago

Major Versions

2.1.0 → 3.0.02022-08-10

3.2.3 → 4.0.02024-03-17

4.0.1 → 5.0.02025-06-23

PHP version history (2 changes)2.0.0PHP ^8.0

4.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/9c060c69332d50a7cb290529ad84a7f216dec94d59950db7446dc93208787083?d=identicon)[michael-rubel](/maintainers/michael-rubel)

---

Top Contributors

[![michael-rubel](https://avatars.githubusercontent.com/u/37669560?v=4)](https://github.com/michael-rubel "michael-rubel (103 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![xalunda](https://avatars.githubusercontent.com/u/2316221?v=4)](https://github.com/xalunda "xalunda (1 commits)")

---

Tags

enhancedhandy-functionslaravellooking-for-contributorsphppipelinepipeline-patternpipelinestransactiontransactionslaravelmichael-rubellaravel-enhanced-pipeline

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/michael-rubel-laravel-enhanced-pipeline/health.svg)

```
[![Health](https://phpackages.com/badges/michael-rubel-laravel-enhanced-pipeline/health.svg)](https://phpackages.com/packages/michael-rubel-laravel-enhanced-pipeline)
```

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.8k28.9M627](/packages/spatie-laravel-data)[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[hirethunk/verbs

An event sourcing package that feels nice.

513162.9k6](/packages/hirethunk-verbs)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
