Skip to content

Commit b413eb9

Browse files
committed
feat: add response->die
1 parent c7753c1 commit b413eb9

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
@@ -213,6 +213,17 @@ public function exit($data, int $code = 500)
213213
exit();
214214
}
215215

216+
/**
217+
* Output some data and break the application
218+
*
219+
* @param mixed $data The data to output
220+
* @param int $code The Http status code
221+
*/
222+
public function die($data, int $code = 500)
223+
{
224+
$this->exit($data, $code);
225+
}
226+
216227
/**
217228
* Redirect
218229
*

0 commit comments

Comments
 (0)