/**
  * Register the addon commands.
  *
  * @param AddonServiceProvider $provider
  */
 protected function registerCommands(AddonServiceProvider $provider)
 {
     if ($commands = $provider->getCommands()) {
         // To register the commands with Artisan, we will grab each of the arguments
         // passed into the method and listen for Artisan "start" event which will
         // give us the Artisan console instance which we will give commands to.
         $this->events->listen('Illuminate\\Console\\Events\\ArtisanStarting', function (ArtisanStarting $event) use($commands) {
             $event->artisan->resolveCommands($commands);
         });
     }
 }