Skip to content

Commit

Permalink
feat: add render function
Browse files Browse the repository at this point in the history
  • Loading branch information
mychidarko committed Jan 29, 2025
1 parent 476a4ae commit 8bd945f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,17 @@ public function view(string $view, array $data = [])
}
}

/**
* Render a view file if a view engine is available
*
* @param string $view The view file to render
* @param array $data The data to pass to the view
*/
public function render(string $view, array $data = [])
{
$this->view($view, $data);
}

/**
* Output some data and break the application
*
Expand Down

0 comments on commit 8bd945f

Please sign in to comment.