Skip to content

Commit

Permalink
fix issue
Browse files Browse the repository at this point in the history
  • Loading branch information
imanghafoori1 committed Dec 12, 2023
1 parent 55e4699 commit 26f3d8e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Utils/WidgetRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ private function makeDataForView($widget, array $args)

if ($widget->presenter) {
// Pipe the data through the presenter before sending it to view.
$viewData = \App::call($widget->presenter, [$viewData]);
[$class, $method] = explode('@', $widget->presenter);
$presenterObj = \App::make($class);
$viewData = $presenterObj->{$method}($viewData);
}

return $viewData;
Expand Down

0 comments on commit 26f3d8e

Please sign in to comment.