/** * Map the command to a handler within a given root namespace. * * @param mixed $command * @param string $commandNamespace * @param string $handlerNamespace * @return string * @static */ public static function simpleMapping($command, $commandNamespace, $handlerNamespace) { return \Collective\Bus\Dispatcher::simpleMapping($command, $commandNamespace, $handlerNamespace); }
/** * Bootstrap any application services. * * @param \Illuminate\Bus\Dispatcher $dispatcher * @return void */ public function boot(Dispatcher $dispatcher) { $dispatcher->mapUsing(function ($command) { return Dispatcher::simpleMapping($command, 'App\\Commands', 'App\\Handlers\\Commands'); }); }
/** * Boot the service provider. * * @param \Collective\Bus\Dispatcher $dispatcher */ public function boot(Dispatcher $dispatcher) { $dispatcher->mapUsing(function ($command) { return Dispatcher::simpleMapping($command, 'Gitamin', 'Gitamin\\Handlers'); }); }