Skip to content

Commit

Permalink
feat: add response->die
Browse files Browse the repository at this point in the history
  • Loading branch information
mychidarko committed Sep 16, 2024
1 parent c7753c1 commit b413eb9
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 @@ -213,6 +213,17 @@ public function exit($data, int $code = 500)
exit();
}

/**
* Output some data and break the application
*
* @param mixed $data The data to output
* @param int $code The Http status code
*/
public function die($data, int $code = 500)
{
$this->exit($data, $code);
}

/**
* Redirect
*
Expand Down

0 comments on commit b413eb9

Please sign in to comment.