/**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire()
 {
     $prefix = is_null($this->argument('prefix')) ? $this->ask('What is the API Prefix?  i.e. "api/v1"') : $this->argument('prefix');
     $this->info('Generating ' . $prefix . ' API Documentation.');
     // generate the docs
     $this->generator->make($prefix);
     $dot_prefix = str_replace('/', '.', $prefix);
     $this->info('API Docs have been generated!');
     $this->info('');
     $this->info('Add the following Route to "app/routes.php" > ');
     // All done!
     $this->info(sprintf("\n %s" . PHP_EOL, "Route::get('docs', function(){\n            \treturn View::make('docs." . $dot_prefix . ".index');\n            });"));
 }
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire()
 {
     $prefix = is_null($this->argument('prefix')) ? $this->ask('What is the API Prefix?  i.e. "api/v1"') : $this->argument('prefix');
     $this->info('Gerando documentação versão ' . $prefix . ' da API.');
     // generate the docs
     $this->generator->make($prefix);
     $dot_prefix = str_replace('/', '.', $prefix);
     $this->info('Documentação da API gerada com sucesso!');
     //       $this->info('');
     //       $this->info('Add the following Route to "app/routes.php" > ');
     // All done!
     //        $this->info(sprintf(
     //            "\n %s" . PHP_EOL,
     //            "Route::get('docs', function(){
     //            	return View::make('docs." . $dot_prefix . ".index');
     //            });"
     //        ));
 }
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire()
 {
     if (!is_null($this->argument('prefix'))) {
         // Command line argument takes 1st precedence.
         $prefix = $this->argument('prefix');
     } else {
         // Check for an environment variable, so you don't have to type
         // the prefix in each time. Otherwise, ask them.
         if (!empty(getenv('APIDOCS_PREFIX'))) {
             $prefix = getenv('APIDOCS_PREFIX');
         } else {
             $prefix = $this->ask('What is the API Prefix?  i.e. "api/v1"');
         }
     }
     $this->info('Generating ' . $prefix . ' API Documentation.');
     // generate the docs
     $this->generator->make($prefix);
     $dot_prefix = str_replace('/', '.', $prefix);
     $this->info('API Docs have been generated!');
     $this->info('');
     $this->info('Add the following Route to "app/routes.php" > ');
     // All done!
     $this->info(sprintf("\n %s" . PHP_EOL, "Route::get('docs', function(){\n            \treturn View::make('docs." . $dot_prefix . ".index');\n            });"));
 }