File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments