Skip to content

Commit

Permalink
fix: patch up response::view()
Browse files Browse the repository at this point in the history
  • Loading branch information
mychidarko committed Jan 29, 2025
1 parent 8bd945f commit d05393a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,20 +240,20 @@ public function noContent()
*/
public function view(string $view, array $data = [])
{
if (!function_exists('view')) {
$this->markup(
if (function_exists('view')) {
return $this->markup(
view($view, $data),
);
}

if (app()->blade()) {
$this->markup(
return $this->markup(
app()->blade()->render($view, $data),
);
}

if (app()->template()) {
$this->markup(
return $this->markup(
app()->template()->render($view, $data),
);
}
Expand Down

0 comments on commit d05393a

Please sign in to comment.