Skip to content

Commit 215a453

Browse files
committed
Add redirect method into Response class
1 parent 45355f0 commit 215a453

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

core/Response.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,9 @@ public function statusCode(int $code)
2020
{
2121
http_response_code($code);
2222
}
23+
24+
public function redirect($url)
25+
{
26+
header("Location: $url");
27+
}
2328
}

0 commit comments

Comments
 (0)