Merge pull request #314 from icedfish/recover-helper-function

recover model's whereXXX() helper function
This commit is contained in:
Barry vd. Heuvel
2016-01-28 07:21:05 +01:00
+11
View File
@@ -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')
);
}
}
}
}