Skip to content

Commit 218298d

Browse files
committed
More updates to clear things up
1 parent 690a4f5 commit 218298d

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

src/RegisterRoute.php

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,17 @@ class RegisterRoute
99
public static function with(string|array $action, ResourceRegistrar $registrar): void
1010
{
1111
$actions = is_array($action) ? $action : [$action];
12-
$registrar = invade($registrar);
1312

14-
$defaultVerbs = $registrar->verbs();
13+
$registrar = invade($registrar);
1514

16-
$registrar->verbs(
17-
$defaultVerbs + array_diff_key(
18-
array_combine($actions, $actions), $defaultVerbs
19-
)
20-
);
15+
$registrar->resourceDefaults = [
16+
...$registrar->resourceDefaults,
17+
...$actions,
18+
];
2119

22-
$registrar->resourceDefaults = array_merge(
23-
$registrar->resourceDefaults, $actions
24-
);
20+
$registrar->verbs([
21+
...array_combine($actions, $actions),
22+
...$registrar->verbs(),
23+
]);
2524
}
2625
}

0 commit comments

Comments
 (0)