BusServiceProvider.php 594 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php namespace App\Providers;
  2. use Illuminate\Bus\Dispatcher;
  3. use Illuminate\Support\ServiceProvider;
  4. class BusServiceProvider extends ServiceProvider {
  5. /**
  6. * Bootstrap any application services.
  7. *
  8. * @param \Illuminate\Bus\Dispatcher $dispatcher
  9. * @return void
  10. */
  11. public function boot(Dispatcher $dispatcher)
  12. {
  13. $dispatcher->mapUsing(function($command)
  14. {
  15. return Dispatcher::simpleMapping(
  16. $command, 'App\Commands', 'App\Handlers\Commands'
  17. );
  18. });
  19. }
  20. /**
  21. * Register any application services.
  22. *
  23. * @return void
  24. */
  25. public function register()
  26. {
  27. //
  28. }
  29. }