diff --git a/src/ComponentGenerator.php b/src/ComponentGenerator.php index 07b09a3..200b36c 100644 --- a/src/ComponentGenerator.php +++ b/src/ComponentGenerator.php @@ -127,7 +127,7 @@ public function generateControl(string $base): PhpFile } } - $renderMethod->addBody("\$this->template->setFile(__DIR__ . '/" . ($this->withTemplateName ? "' . \$this->templateName . '" : $this->lname) . ".latte');"); + $renderMethod->addBody("\$this->template->render(__DIR__ . '/" . ($this->withTemplateName ? "' . \$this->templateName . '" : $this->lname) . ".latte');"); $file = (new PhpFile)->setStrictTypes(); $file->addNamespace($namespace);