PHPackages                             kylwes/laravel-pipes - 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. kylwes/laravel-pipes

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

kylwes/laravel-pipes
====================

Easily chain and execute multiple actions on a single data object.

1.0.0(3y ago)110MITPHPPHP ^8.0

Since Feb 20Pushed 3y ago1 watchersCompare

[ Source](https://github.com/kylwes/laravel-pipes)[ Packagist](https://packagist.org/packages/kylwes/laravel-pipes)[ RSS](/packages/kylwes-laravel-pipes/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (2)Versions (7)Used By (0)

Laravel Pipes
=============

[](#laravel-pipes)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ab7b710e9046e8a395d0a7ba2c99e5d550252a4a7b2093143b86b15aab9a15c7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b796c7765732f6c61726176656c2d70697065732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kylwes/laravel-pipes)[![Total Downloads](https://camo.githubusercontent.com/3e64f9e6d0911066b21765792e252a135fbfea0a95171f5fbde8b5de5bdf46dc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b796c7765732f6c61726176656c2d70697065732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kylwes/laravel-pipes)

Laravel Pipes is a PHP library that allows you to easily chain and execute multiple actions on a single data object. It is inspired by the Unix pipe concept, where the output of one command can be used as the input to another command.

```
$user = $createUser->execute($request->validated());
$sendWelcomeEmail->execute($user);
```

you can write this:

```
$user = pipe($request->validated(), [
    CreateUser::class,
    SendWelcomeEmail::class,
]);
```

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

[](#installation)

You can install the package via composer:

```
composer require kylwes/pipe
```

Usage
-----

[](#usage)

You can create a pipe by use the `pipe` function:

```
$user = pipe($request->validated(), [
    CreateUser::class,
    SendWelcomeEmail::class,
]); // $user is an instance of App\Models\User
```

When one of your actions expects another parameter, you can use the `with` method:

```
// App\Actions\AssignRoleToUser.php
class AssignRoleToUser
{
    public function execute(User $user, $role)
    {
        $user->assignRole($role);

        return $user;
    }
}

// App\Http\Controllers\UserController.php
$user = pipe($request->validated())
    ->with(['role' => Role::find(1)])
    ->through([
        CreateUser::class,
        AssignRoleToUser::class,
        SendWelcomeEmail::class,
    ]); // $user is an instance of App\Models\User
```

You can also use pass anonymous functions:

```
$user = pipe($data, [
    CreateUser::class,
    function ($user) {
        $user->assignRole(Role::find(1));

        return $user;
    },
    SendWelcomeEmail::class,
]); // $user is an instance of App\Models\User
```

or call a function:

```
$title = pipe('  My awesome title   ', [
    'trim',
    'strtoupper',
]); // $title is 'MY AWESOME TITLE'
```

You can also pipe each individual item in an array or collection by using the `->each()` method:

```
$users = pipe($users)
    ->each()
    ->through([
        ResetAnswers::class,
        InviteForNextSession::class,
    ]);
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Contributions are welcome! If you find a bug or have a feature request, please open an issue on GitHub. If you would like to contribute code, please fork the repository and submit a pull request.

Credits
-------

[](#credits)

- [Kylian Wester](https://github.com/kylwes)

License
-------

[](#license)

Laravel Pipes is licensed under the MIT license. See the LICENSE file for details.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60% 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 ~2 days

Total

5

Last Release

1169d ago

Major Versions

0.3.1 → 1.0.02023-02-28

### Community

Maintainers

![](https://www.gravatar.com/avatar/6fc9a3e491ac6bd846d098039ed70f7ea284bd9904f4427c63a1b2e64533620a?d=identicon)[kylwes](/maintainers/kylwes)

---

Top Contributors

[![kyliankobalt](https://avatars.githubusercontent.com/u/172366800?v=4)](https://github.com/kyliankobalt "kyliankobalt (9 commits)")[![kylwes](https://avatars.githubusercontent.com/u/39100382?v=4)](https://github.com/kylwes "kylwes (6 commits)")

---

Tags

laravelactionspipes

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/kylwes-laravel-pipes/health.svg)

```
[![Health](https://phpackages.com/badges/kylwes-laravel-pipes/health.svg)](https://phpackages.com/packages/kylwes-laravel-pipes)
```

###  Alternatives

[tormjens/eventy

The WordPress filter/action system in Laravel

438912.9k16](/packages/tormjens-eventy)[glhd/conveyor-belt

14797.0k](/packages/glhd-conveyor-belt)[defstudio/actions

Helpers methods for Laravel Actions

119.8k](/packages/defstudio-actions)

PHPackages © 2026

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