- Added a new RenderRawView without the default HTML reponse

This commit is contained in:
mcndave committed 2021-03-10 13:55:58 +00:00
1 parent 01bb926ca7
commit 434e3c0c46
2 files changed
+6 -2

No files matched your search

+6 -1
View File
@@ -47,10 +47,15 @@ trait ControllerTrait {
return $this->renderJson( array_filter($data ?? [], function($row) { return $row !== null; }));
}
public function renderRawView(string $view, ?array $variables = null) : string
{
return $this->picea->renderHtml($view, $variables ?? [], $this);
}
public function renderView(string $view, ?array $variables = null) : ResponseInterface
{
return static::renderHtml(
$this->picea->renderHtml($view, $variables ?? [], $this)
$this->renderRawView($view, $variables ?? [])
);
}