Skip to content

Commit

Permalink
[10.x] allow resolving view from closure (#48719)
Browse files Browse the repository at this point in the history
* allow resolving view from closure

* fix styling
  • Loading branch information
ph7jack authored Oct 13, 2023
1 parent c1eacdb commit 482ea8a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Component.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ public function resolveView()
}

$resolver = function ($view) {
if ($view instanceof ViewContract) {
return $view;
}

return $this->extractBladeViewFromString($view);
};

Expand Down

0 comments on commit 482ea8a

Please sign in to comment.