Skip to content

Commit 5f836a0

Browse files
authored
fix: add @template TModel of static for Eloquent
1 parent 59eb267 commit 5f836a0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

resources/views/helper.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ public static function <?= $method->getName() ?>(<?= $method->getParamsWithDefau
4949
<?php foreach ($namespaces_by_alias_ns as $namespace => $aliases) : ?>
5050
namespace <?= $namespace == '__root' ? '' : trim($namespace, '\\') ?> {
5151
<?php foreach ($aliases as $alias) : ?>
52+
<?php if ($alias->getExtendsNamespace() == '\Illuminate\Database\Eloquent') : ?>
53+
/** @template TModel of static */
54+
<?php endif?>
5255
<?= $alias->getClassType() ?> <?= $alias->getShortName() ?> extends <?= $alias->getExtends() ?> {<?php if ($alias->getExtendsNamespace() == '\Illuminate\Database\Eloquent') : ?>
5356
<?php foreach ($alias->getMethods() as $method) : ?>
5457
<?= trim($method->getDocComment(' ')) ?>

0 commit comments

Comments
 (0)