PHPackages                             desmart/laravel-commandbus - 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. desmart/laravel-commandbus

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

desmart/laravel-commandbus
==========================

DeSmart CommandBus for Laravel

1.1.1(5y ago)03.4k2MITPHPPHP &gt;=5.6.0

Since Jul 1Pushed 5y ago4 watchersCompare

[ Source](https://github.com/DeSmart/laravel-commandbus)[ Packagist](https://packagist.org/packages/desmart/laravel-commandbus)[ RSS](/packages/desmart-laravel-commandbus/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (5)Used By (2)

Laravel CommandBus
==================

[](#laravel-commandbus)

A small, pluggable command bus.

Instalation
-----------

[](#instalation)

1. `$ composer require desmart/laravel-commandbus`
2. Add `DeSmart\CommandBus\ServiceProvider` to `app.php`

Example usage:
--------------

[](#example-usage)

### Command Class

[](#command-class)

```
class RegisterUserCommand
{
    protected $email;

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

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

### CommandValidator Class

[](#commandvalidator-class)

```
class RegisterUserCommandValidator
{
    public function validate(RegisterUserCommand $command)
    {
        // it will be called before handler
    }
}
```

### CommandHandler Class

[](#commandhandler-class)

```
class RegisterUserCommandHandler
{
    public function handle(RegisterUserCommand $command)
    {
        // it will be called if validator won't throw any exception
    }
}
```

### Execute the command:

[](#execute-the-command)

```
class Controller
{
    /**
     * @var \DeSmart\CommandBus\Contracts\CommandBus
     */
    protected $commandBus;

    public function __construct(\DeSmart\CommandBus\Contracts\CommandBus $commandBus)
    {
        $this->commandBus = $commandBus;
    }

    public function index()
    {
        $command = new RegisterUserCommand("foo@bar.net");
        $this->commandBus->handle($command);
    }
}
```

###  Health Score

30

—

LowBetter than 65% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity61

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 ~650 days

Total

4

Last Release

2015d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/92bc27fc8f1cba837cef419eee0fae358f52c804cd5450cf994f9095fa387a5c?d=identicon)[DeSmart](/maintainers/DeSmart)

---

Top Contributors

[![golonix](https://avatars.githubusercontent.com/u/9950778?v=4)](https://github.com/golonix "golonix (4 commits)")

### Embed Badge

![Health badge](/badges/desmart-laravel-commandbus/health.svg)

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

###  Alternatives

[illuminate/events

The Illuminate Events package.

13454.3M1.7k](/packages/illuminate-events)[psalm/plugin-laravel

Psalm plugin for Laravel

3274.9M308](/packages/psalm-plugin-laravel)[illuminate/broadcasting

The Illuminate Broadcasting package.

7126.5M178](/packages/illuminate-broadcasting)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[igorsgm/laravel-git-hooks

🪝• Efficiently manage Git hooks in Laravel projects. Enhance code quality, save time on reviews, and prevent bugs from entering your repository.

2931.7k1](/packages/igorsgm-laravel-git-hooks)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)

PHPackages © 2026

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