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 bfabef3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ jobs:
composer require "laravel/framework=${{ matrix.laravel }}" --no-update
composer update --prefer-dist --no-interaction --no-progress
- name: Execute tests
run: vendor/bin/phpunit --verbose
run: vendor/bin/phpunit
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 bfabef3

Please sign in to comment.