jildertmiedema/laravel-tactician
Tactician for laravel 5+
5,164
9
| Install | |
|---|---|
composer require jildertmiedema/laravel-tactician |
|
| Latest Version: | V0.8.1 |
| PHP: | >=8.3.0 |
| Laravel: | 13 |
| License: | MIT |
| Last Updated: | Aug 3, 2026 |
| Links: | GitHub · Packagist |
Maintainer: jildertmiedema
laravel-tactician
Tactician command bus for laravel 12+
Install
composer require jildertmiedema/laravel-tactician
Add JildertMiedema\LaravelTactician\TacticianServiceProvider to your app.php
Run this in the command line:
php artisan vendor:publish
Edit config/tactician.php and set your namespaces
Usage
In your controllers or console commands you can use the trait JildertMiedema\LaravelTactician\DispatchesCommands.
use YourApp\Commmands\DoSomethingCommand;
use Illuminate\Routing\Controller as BaseController;
use JildertMiedema\LaravelTactician\DispatchesCommands;
class Controller extends BaseController
{
use DispatchesCommands;
public function store(Request $request)
{
$command = new DoSomethingCommand($request->get('id'), $request->get('value'));
$this->dispatch($command);
return redirect('/');
}
}
Extending
Middleware
In your own ServiceProvider:
$this->app['tactician.middleware']->prepend('your.middleware');
$this->app->bind('your.middleware', function () {
return new MiddleWare
});
Locator
The default locator is set in the container by tactician.handler.locator, of course you can change it.
In your own ServiceProvider:
$this->bind('tactician.handler.locator', function () {
return new YourLocator();
});
Related Packages
doctrine/dbal
Powerful PHP database abstraction layer (DBAL) with many features for database s...
641,106,524
9,700
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| V0.8.1 | >=8.3.0 | ^13.0 | MIT | |
| V0.8.0 | >=8.3.0 | ^12.0 | MIT | |
| v0.7.0 | >=8.3.0 | ^12.0 | MIT | |
| V0.6.0 | >=8.1.0 | ^10.0 | MIT | |
| v0.5.0 | >=7.3.0 | ^8.0 | MIT | |
| v0.4.1 | >=7.2.0 | ^6.0 | MIT | |
| v0.4.0 | >=7.2.0 | ^6.0 | MIT | |
| v0.3.0 | >=5.5.9 | ^5.1 | MIT | |
| v0.2.2 | >=5.5.9 | ^5.1 | MIT | |
| v0.2.1 | >=5.5.9 | ^5.1 | MIT | |
| v0.2.0 | >=5.5.9 | ^5.1 | MIT | |
| v0.1.1 | >=5.5.9 | ^5.0 | MIT | |
| v0.1.0 | ^5.1 | MIT |