Skip to content

Commit

Permalink
Fix rendering column from blade file
Browse files Browse the repository at this point in the history
Fix Issue yajra#2062

Column with blade file is rendered by view() but it cannot be converted to json response. render() will return just HTML code.
Also without render if we try to debug $data inside DT source by Log or var_dump it will result with "Allowed memory size of xxx bytes exhausted".
  • Loading branch information
chojnicki authored Apr 23, 2019
1 parent 0c5764b commit dc3a112
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Utilities/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public static function compileContent($content, array $data, $param)
public static function compileBlade($str, $data = [])
{
if (view()->exists($str)) {
return view($str, $data);
return view($str, $data)->render();
}

ob_start() && extract($data, EXTR_SKIP);
Expand Down

0 comments on commit dc3a112

Please sign in to comment.