From cffcd07e987a6696e9eab6bb8d6d454a40f8db1c Mon Sep 17 00:00:00 2001 From: "Barry vd. Heuvel" Date: Mon, 30 Dec 2024 12:58:28 +0100 Subject: [PATCH] Also add eloquent template tags from base class (#1645) --- src/Alias.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Alias.php b/src/Alias.php index 599b396..9103a58 100644 --- a/src/Alias.php +++ b/src/Alias.php @@ -488,6 +488,15 @@ class Alias $reflection = new ReflectionClass($class); $traits = collect($reflection->getTraitNames()); + $phpdoc = new DocBlock($reflection); + $templates = $phpdoc->getTagsByName('template'); + /** @var DocBlock\Tag\TemplateTag $template */ + foreach ($templates as $template) { + $template->setBound('static'); + $template->setDocBlock($templateDoc); + $templateDoc->appendTag($template); + } + foreach ($traits as $trait) { $phpdoc = new DocBlock(new ReflectionClass($trait)); $templates = $phpdoc->getTagsByName('template');