Level 2
Any one? this is a hot question lately it's seems like the new Jobs are generating confusion on the comunity
I'm having an issue when trying to create an old structure Command/Handler instead of Jobs because I need Handlers in one side and Commands in other side however when setting the dispatcher's mapper like so on my AppServiceProvider:
$dispatcher = \App::make('Illuminate\Bus\Dispatcher');
$dispatcher->mapUsing(function ($command) {
return Dispatcher::simpleMapping($command, 'My\Core\API\Commands', 'My\Core\API\Handlers\Commands');
});
It's seems like the dispatcher is not being resolved as singleton and my map Closure do not get effect when trying to dispatch my command
You will find a good explanation about what's going on in here
Please or to participate in this conversation.