PHPackages                             it-devgroup/laravel-command-bus - 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. [Framework](/categories/framework)
4. /
5. it-devgroup/laravel-command-bus

ActiveLibrary[Framework](/categories/framework)

it-devgroup/laravel-command-bus
===============================

Simple Command Bus for Laravel framework

1.0(8y ago)020.0k↓50%MITPHP

Since Jan 23Pushed 8y agoCompare

[ Source](https://github.com/it-devgroup/laravel-command-bus)[ Packagist](https://packagist.org/packages/it-devgroup/laravel-command-bus)[ RSS](/packages/it-devgroup-laravel-command-bus/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (3)Used By (0)

Command Bus
===========

[](#command-bus)

> Simple Command Bus for Laravel framework

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

[](#installation)

Require this package in your `composer.json` and update composer.

```
"it-devgroup/laravel-command-bus ": "^1.0"
```

After updating composer, add the ServiceProvider to the providers array in `config/app.php`

```
ItDevgroup\CommandBus\CommandBusServiceProvider::class,
```

Example
-------

[](#example)

```
class UserController extends AbstractController
{
    public function store(Request $request)
    {
        $user = $this->dispatch(new RegisterUser(
            trim($request->input('email')),
            trim($request->input('password'))
        ));

        return $user;
    }
}
```

Usage
-----

[](#usage)

#### Command

[](#command)

```
class RegisterUser implements \ItDevgroup\CommandBus\Command
{
    private $email;
    private $password;

    public function __construct($email, $password)
    {
        $this->email = $email;
        $this->password = $password;
    }

    public function email()
    {
        return $this->email;
    }

    public function password()
    {
        return $this->password;
    }
}
```

#### Handler

[](#handler)

```
class RegisterUserHandler implements \ItDevgroup\CommandBus\Handler
{
    private $userRepository;

    public function __construct(UserRepository $userRepository)
    {
        $this->userRepository = $userRepository;
    }

    public function handle(\ItDevgroup\CommandBus\Command $command)
    {
        $user = new User(
            $command->email(),
            $command->password()
        );

        $this->userRepository->store($user);

        return $user;
    }
}
```

#### Controllers

[](#controllers)

```
class AbsctractController extends \Illuminate\Routing\Controller
{
    private $dispatcher;

    public function __construct(\ItDevgroup\CommandBus\CommandBus $dispatcher)
    {
        $this->dispatcher = $dispatcher;
    }

    public function dispatch(\ItDevgroup\CommandBus\Command $command)
    {
        return $this->dispatcher->execute($command);
    }
}
```

```
class UserController extends AbstractController
{
    public function store(Request $request)
    {
        $user = $this->dispatch(new RegisterUser(
            trim($request->input('email')),
            trim($request->input('password'))
        ));

        return $user;
    }
}
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

3037d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/92de536ed594c6be4260fea058f064d39e6469361caab16edb28cdfa83980294?d=identicon)[it-devgroup](/maintainers/it-devgroup)

---

Top Contributors

[![it-devgroup](https://avatars.githubusercontent.com/u/35729675?v=4)](https://github.com/it-devgroup "it-devgroup (1 commits)")

---

Tags

laravel

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/it-devgroup-laravel-command-bus/health.svg)

```
[![Health](https://phpackages.com/badges/it-devgroup-laravel-command-bus/health.svg)](https://phpackages.com/packages/it-devgroup-laravel-command-bus)
```

###  Alternatives

[laravel/nightwatch

The official Laravel Nightwatch package.

3486.1M13](/packages/laravel-nightwatch)[codewithdennis/larament

Larament is a time-saving starter kit to quickly launch Laravel 13.x projects. It includes FilamentPHP 5.x pre-installed and configured, along with additional tools and features to streamline your development workflow.

3691.5k](/packages/codewithdennis-larament)[kompo/kompo

Laravel &amp; Vue.js FullStack Components for Rapid Application Development

11812.4k21](/packages/kompo-kompo)

PHPackages © 2026

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