diff --git a/src/Console/ModelsCommand.php b/src/Console/ModelsCommand.php index d93325a..7d5fbfe 100644 --- a/src/Console/ModelsCommand.php +++ b/src/Console/ModelsCommand.php @@ -290,6 +290,17 @@ class ModelsCommand extends Command $comment = $column->getComment(); $this->setProperty($name, $type, true, true, $comment); + /* + Only add whereXXX() helper function comment to _ide_helper_models.php, + keep model file as simple as possible. + */ + if (!$this->write) { + $this->setMethod( + Str::camel("where_" . $name), + '\Illuminate\Database\Query\Builder|\\' . get_class($model), + array('$value') + ); + } } } }