diff --git a/src/Barryvdh/LaravelIdeHelper/ModelsCommand.php b/src/Barryvdh/LaravelIdeHelper/ModelsCommand.php index 23800ff..6063758 100644 --- a/src/Barryvdh/LaravelIdeHelper/ModelsCommand.php +++ b/src/Barryvdh/LaravelIdeHelper/ModelsCommand.php @@ -58,6 +58,7 @@ class ModelsCommand extends Command { $this->write = $this->option('write'); $this->dir = $this->option('dir'); $model = $this->argument('model'); + $ignore = $this->option('ignore'); $this->reset = $this->option('reset'); //If filename is default and Write is not specified, ask what to do @@ -67,7 +68,7 @@ class ModelsCommand extends Command { } } - $content = $this->generateDocs($model); + $content = $this->generateDocs($model, $ignore); if(!$this->write){ $written = \File::put($filename, $content); @@ -89,7 +90,6 @@ class ModelsCommand extends Command { { return array( array('model', InputArgument::OPTIONAL, 'Which models to include', '*'), - array('ignore', InputArgument::OPTIONAL, 'Which models to ignore', null), ); } @@ -106,10 +106,11 @@ class ModelsCommand extends Command { array('write', 'W', InputOption::VALUE_NONE, 'Write to Model file'), array('nowrite', 'N', InputOption::VALUE_NONE, 'Don\'t write to Model file'), array('reset', 'R', InputOption::VALUE_NONE, 'Remove the original phpdocs instead of appending'), + array('ignore', 'I', InputOption::VALUE_OPTIONAL, 'Which models to ignore', ''), ); } - protected function generateDocs($model){ + protected function generateDocs($model, $ignore = ''){ $output = "comment("Ignoring model '$name'"); + continue; + }else{ + $this->comment("Loading model '$name'"); + } $this->properties = array(); $this->methods = array(); if(class_exists($name)){