/**
  * Boot the service provider.
  *
  * @param \AltThree\Bus\Dispatcher $dispatcher
  */
 public function boot(Dispatcher $dispatcher)
 {
     $dispatcher->mapUsing(function ($command) {
         return Dispatcher::simpleMapping($command, 'CachetHQ\\Cachet', 'CachetHQ\\Cachet\\Handlers');
     });
     Str::macro('canonicalize', function ($url) {
         return preg_replace('/([^\\/])$/', '$1/', $url);
     });
 }
Example #2
0
 /**
  * Boot the service provider.
  *
  * @param \AltThree\Bus\Dispatcher $dispatcher
  */
 public function boot(Dispatcher $dispatcher)
 {
     $dispatcher->mapUsing(function ($command) {
         return Dispatcher::simpleMapping($command, 'CachetHQ\\Cachet\\Bus', 'CachetHQ\\Cachet\\Bus\\Handlers');
     });
     $dispatcher->pipeThrough([UseDatabaseTransactions::class]);
     Str::macro('canonicalize', function ($url) {
         return preg_replace('/([^\\/])$/', '$1/', $url);
     });
 }