title: How to show progress bar on class for commands
body: <p>All examples for use Progress Bar show a code easy but work on artisan command </p>
  
  <pre><code>$users = App\User::all();
  
  $bar = $this-&gt;output-&gt;createProgressBar(count($users));
  
  foreach ($users as $user) {
      $this-&gt;performTask($user);
  
      $bar-&gt;advance();
  }
  
  $bar-&gt;finish();
  </code></pre>
  
  <p>But I like implement on one class called from my command but does not work.</p>
  
  <pre><code>php artisan migratedb:migrate table --table=cms_users
  </code></pre>
  
  <p>MigrateDatabase.php</p>
  
  <pre><code> ...
   use Abkrim\Setdart\MigrateTables;
  
   $migration = new MigrateTables($this-&gt;argument('type'), $this-&gt;option('table'));
   $migration-&gt;runMigration();
  </code></pre>
  
  <p>MigrateTables.php</p>
  
  <pre><code>... 
  
  private function migration_cms_users() {
     ... 
     $bar = $this-&gt;output-&gt;createdProgressBar($this-&gt;getNumberRows($db));  // Error (1)
     ...
     $bar = new ProgressBar($output, $this-&gt;getNumberRows($db));  // Example on [Symfony][1] Undefined variable: output 
  
  }
  
  
  (1) [ErrorException]                                           
    Undefined property: Abkrim\Setdart\MigrateTables::$output
  (2) [ErrorException]            
    Undefined variable: output  
  </code></pre>