Skip to content

Commit

Permalink
Merge pull request #3067 from OzanKurt/patch-8
Browse files Browse the repository at this point in the history
feat: Ability to pass static data to a blade render
  • Loading branch information
yajra authored Sep 29, 2023
2 parents 9165711 + dac4426 commit 39923f8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Utilities/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@ public static function compileContent($content, array $data, array|object $param

return $content($param);
}


if (is_array($content)) {
[$view, $viewData] = $content;

return static::compileBlade($view, static::getMixedValue($data, $param) + $viewData);
}

return $content;
}
Expand Down

0 comments on commit 39923f8

Please sign in to comment.