Add Eloquent methods back

This commit is contained in:
Barry vd. Heuvel
2017-02-22 13:27:33 +01:00
committed by GitHub
parent 456853be46
commit e82de98cef
+15 -1
View File
@@ -42,7 +42,21 @@ namespace {
<?php foreach($namespaces as $namespace => $aliases): ?> <?php foreach($namespaces as $namespace => $aliases): ?>
<?php foreach($aliases as $alias): ?> <?php foreach($aliases as $alias): ?>
<?= $alias->getClassType() ?> <?= $alias->getShortName() ?> extends <?= $alias->getExtends() ?> {} <?= $alias->getClassType() ?> <?= $alias->getShortName() ?> extends <?= $alias->getExtends() ?> {<?php if ($namespace == '\Illuminate\Database\Eloquent'): ?>
<?php foreach($alias->getMethods() as $method): ?>
<?= trim($method->getDocComment(' ')) ?>
public static function <?= $method->getName() ?>(<?= $method->getParamsWithDefault() ?>)
{<?php if($method->getDeclaringClass() !== $method->getRoot()): ?>
//Method inherited from <?= $method->getDeclaringClass() ?>
<?php endif; ?>
<?= $method->shouldReturn() ? 'return ': '' ?><?= $method->getRoot() ?>::<?= $method->getName() ?>(<?= $method->getParams() ?>);
}
<?php endforeach; ?>
<?php endif; ?>}
<?php endforeach; ?> <?php endforeach; ?>
<?php endforeach; ?> <?php endforeach; ?>