Skip to content

Commit 7a8500a

Browse files
authored
support router args if using router with name (#28)
1 parent 8713b4d commit 7a8500a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Response.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ public function die($data, int $code = 500)
277277
public function redirect($url, int $status = 302, bool $exit = true)
278278
{
279279
if (is_array($url)) {
280-
$url = app()->route($url[0]);
280+
$url = app()->route($url[0], ...array_slice($url, 1));
281281
}
282282

283283
if (class_exists('Leaf\App') && !strpos($url, '://')) {

0 commit comments

Comments
 (0)