暫無描述

BusServiceProvider.php 594B

1234567891011121314151617181920212223242526272829303132333435
  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. }