Skip to content

Commit 8bd945f

Browse files
committed
feat: add render function
1 parent 476a4ae commit 8bd945f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Response.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,17 @@ public function view(string $view, array $data = [])
259259
}
260260
}
261261

262+
/**
263+
* Render a view file if a view engine is available
264+
*
265+
* @param string $view The view file to render
266+
* @param array $data The data to pass to the view
267+
*/
268+
public function render(string $view, array $data = [])
269+
{
270+
$this->view($view, $data);
271+
}
272+
262273
/**
263274
* Output some data and break the application
264275
*

0 commit comments

Comments
 (0)