diff options
Diffstat (limited to 'lib/classes/VueApp.php')
| -rw-r--r-- | lib/classes/VueApp.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/classes/VueApp.php b/lib/classes/VueApp.php index c26b011..910f503 100644 --- a/lib/classes/VueApp.php +++ b/lib/classes/VueApp.php @@ -83,6 +83,15 @@ final class VueApp implements Stringable } /** + * Set the content of a slot. + */ + public function setSlot(string $name, string|Template $content): VueApp + { + $this->slots[$name] = $content instanceof Template ? $content->render() : $content; + return $this; + } + + /** * Add a slot with the given name * * If you pass a flexi template as the content, it will be rendered. |
