server/src/app/Providers/BusServiceProvider.php
changeset 2 00e2916104fe
parent 1 01a844d292ac
equal deleted inserted replaced
1:01a844d292ac 2:00e2916104fe
     1 <?php namespace App\Providers;
     1 <?php
       
     2 
       
     3 namespace CorpusParole\Providers;
     2 
     4 
     3 use Illuminate\Bus\Dispatcher;
     5 use Illuminate\Bus\Dispatcher;
     4 use Illuminate\Support\ServiceProvider;
     6 use Illuminate\Support\ServiceProvider;
     5 
     7 
     6 class BusServiceProvider extends ServiceProvider {
     8 class BusServiceProvider extends ServiceProvider
       
     9 {
       
    10     /**
       
    11      * Bootstrap any application services.
       
    12      *
       
    13      * @param \Illuminate\Bus\Dispatcher $dispatcher
       
    14      */
       
    15     public function boot(Dispatcher $dispatcher)
       
    16     {
       
    17         $dispatcher->mapUsing(function ($command) {
       
    18             return Dispatcher::simpleMapping(
       
    19                 $command, 'CorpusParole\Commands', 'CorpusParole\Handlers\Commands'
       
    20             );
       
    21         });
       
    22     }
     7 
    23 
     8 	/**
    24     /**
     9 	 * Bootstrap any application services.
    25      * Register any application services.
    10 	 *
    26      */
    11 	 * @param  \Illuminate\Bus\Dispatcher  $dispatcher
    27     public function register()
    12 	 * @return void
    28     {
    13 	 */
    29         //
    14 	public function boot(Dispatcher $dispatcher)
    30     }
    15 	{
       
    16 		$dispatcher->mapUsing(function($command)
       
    17 		{
       
    18 			return Dispatcher::simpleMapping(
       
    19 				$command, 'App\Commands', 'App\Handlers\Commands'
       
    20 			);
       
    21 		});
       
    22 	}
       
    23 
       
    24 	/**
       
    25 	 * Register any application services.
       
    26 	 *
       
    27 	 * @return void
       
    28 	 */
       
    29 	public function register()
       
    30 	{
       
    31 		//
       
    32 	}
       
    33 
       
    34 }
    31 }