Skip to content

Commit 39923f8

Browse files
authored
Merge pull request #3067 from OzanKurt/patch-8
feat: Ability to pass static data to a blade render
2 parents 9165711 + dac4426 commit 39923f8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Utilities/Helper.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,13 @@ public static function compileContent($content, array $data, array|object $param
109109

110110
return $content($param);
111111
}
112+
113+
114+
if (is_array($content)) {
115+
[$view, $viewData] = $content;
116+
117+
return static::compileBlade($view, static::getMixedValue($data, $param) + $viewData);
118+
}
112119

113120
return $content;
114121
}

0 commit comments

Comments
 (0)