recover model's whereXXX() helper function

This commit is contained in:
Yu Bing
2016-01-28 11:18:42 +08:00
parent aa8f772a46
commit c77752bb58
+11
View File
@@ -290,6 +290,17 @@ class ModelsCommand extends Command
$comment = $column->getComment(); $comment = $column->getComment();
$this->setProperty($name, $type, true, true, $comment); $this->setProperty($name, $type, true, true, $comment);
/*
Only add whereXXX() helper function comment to _ide_helper_models.php,
keep modal file as simple as possible.
*/
if (!$this->write) {
$this->setMethod(
Str::camel("where_" . $name),
'\Illuminate\Database\Query\Builder|\\' . get_class($model),
array('$value')
);
}
} }
} }
} }