Zero Configuration
Drop in the package and go. Handlers, notifications, and actions are discovered automatically โ no registration arrays, no service providers to edit.
Decouple your commands, queries, and events with zero configuration. Auto-discovery, attribute routing, and pipelines โ out of the box.
Decouple your business logic, routing, and side effects instantly.
// app/Http/Actions/RegisterUserAction.php
#[Api] // โก Applies 'api' middleware group AND 'api/' prefix automatically
class RegisterUserAction
{
use AsAction;
public function __construct(private readonly Mediator $mediator) {}
public static function route(Router $router): void
{
$router->post('/register'); // POST /api/register
}
public function handle(RegisterUserRequest $request): JsonResponse
{
$user = $this->mediator->send($request); // โ RegisterUserHandler
$this->mediator->publish(new UserRegisteredEvent($user->id)); // โ N notifications
return response()->json($user, 201);
}
}