New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

desmart/laravel-commandbus

DeSmart CommandBus for Laravel
3,395

Larablocks Analysis

desmart/laravel-commandbus works with Laravel 5 (latest release 1.1.1, Nov 2, 2020), which reached end of life: no more fixes, even for security.

Recommendation checks

Not advised

Not advised: no release or commit in over 2 years.

  • No release or commit in over 2 years
  • Supports only Laravel 5, past end of life
  • No release in the last 12 months (last: Nov 2, 2020)
  • 0 downloads a month (needs 10,000)
  • 0 GitHub stars (needs 100)

State

Likely abandoned
  • No release or commit in over 2 years.
  • Last stable release: Nov 2, 2020.
  • No releases in the last 12 months.
  • First released: Jul 1, 2015.
  • 0 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Nov 27, 2026.

Install
composer require desmart/laravel-commandbus
Latest Version:1.1.1
PHP:>=5.6.0
Laravel:5
License:MIT
Last Updated:Nov 2, 2020
Links: GitHub  ·  Packagist
Maintainer: DeSmart

Laravel CommandBus

A small, pluggable command bus.

Instalation

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

Example usage:

Command Class

class RegisterUserCommand
{
    protected $email;

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

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

CommandValidator Class

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

CommandHandler Class

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

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);
    }
}

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

670,032,257 9,703
laravel/framework

The Laravel Framework.

640,572,096 35,338
laravel/tinker

Powerful REPL for the Laravel framework.

546,909,908 7,440
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

465,816,364 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

431,187,642 4,660

Version History

Version Released PHP Laravel License
1.1.1 >=5.6.0 5.1.* | ~5.2 MIT
1.1.0 >=5.6.0 ~5.2 MIT
1.0.1 >=5.6.0 ~5.1 MIT
1.0.0 >=5.6.0 ~5.1 MIT