We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af44977 commit e5bb44cCopy full SHA for e5bb44c
src/Response.php
@@ -263,7 +263,7 @@ public function die($data, int $code = 500)
263
* @param string|array $url The redirect destination
264
* @param int $status The redirect HTTP status code
265
*/
266
- public function redirect($url, int $status = 302)
+ public function redirect($url, int $status = 302, bool $exit = true)
267
{
268
if (is_array($url)) {
269
$url = app()->route($url[0]);
@@ -280,6 +280,10 @@ public function redirect($url, int $status = 302)
280
281
Headers::status($status);
282
Headers::set('Location', $url, true, $status);
283
+
284
+ if ($exit) {
285
+ exit($status);
286
+ }
287
}
288
289
/**
0 commit comments