Skip to content

Commit 690a4f5

Browse files
committed
Update fix for modifying route verbs
1 parent 7345c70 commit 690a4f5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/RegisterRoute.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ public static function with(string|array $action, ResourceRegistrar $registrar):
1111
$actions = is_array($action) ? $action : [$action];
1212
$registrar = invade($registrar);
1313

14-
$registrar->verbs(array_combine($actions, $actions));
14+
$defaultVerbs = $registrar->verbs();
15+
16+
$registrar->verbs(
17+
$defaultVerbs + array_diff_key(
18+
array_combine($actions, $actions), $defaultVerbs
19+
)
20+
);
1521

1622
$registrar->resourceDefaults = array_merge(
1723
$registrar->resourceDefaults, $actions

0 commit comments

Comments
 (0)