From 467b5f5b5ffb9d9a0c1229cf121fd2f7e5956e73 Mon Sep 17 00:00:00 2001 From: "Barry vd. Heuvel" Date: Wed, 2 Mar 2016 10:42:37 +0100 Subject: [PATCH] Always add whereColumn Fixes #300, #325 --- src/Console/ModelsCommand.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/Console/ModelsCommand.php b/src/Console/ModelsCommand.php index 4005011..d0bd892 100644 --- a/src/Console/ModelsCommand.php +++ b/src/Console/ModelsCommand.php @@ -291,17 +291,7 @@ 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') - ); - } + $this->setMethod(Str::camel("where_" . $name), '\Illuminate\Database\Query\Builder|\\' . get_class($model), array('$value')); } } }