Skip to content

Commit ab004f5

Browse files
committed
remove php block, toJson
1 parent 612391c commit ab004f5

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

resources/method.blade.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,10 @@
44
method: @js($verbs->first()->actual),
55
})
66

7-
@php
8-
$verbsArray = $verbs->map(fn($verb) => $verb->actual)->join("','");
9-
@endphp
10-
117
{!! $method !!}.definition = {
12-
methods: ['{!! $verbsArray !!}'],
8+
methods: {!! $verbs->pluck('actual')->toJson() !!},
139
url: {!! $uri !!},
14-
} satisfies RouteDefinition<['{!! $verbsArray !!}']>
10+
} satisfies RouteDefinition<{!! $verbs->pluck('actual')->toJson() !!}>
1511

1612
@include('wayfinder::docblock')
1713
{!! $method !!}.url = (@include('wayfinder::function-arguments')) => {

0 commit comments

Comments
 (0)