1
1
@use ( 'Illuminate\Support\HtmlString' )
2
2
@include ( 'wayfinder::docblock' )
3
- { ! ! when ( ( $export ?? true ) && ! $isInvokable , 'export ' ) ! ! } const { ! ! $method ! ! } = ( @include ( 'wayfinder::function-arguments' ) ) => ( {
3
+ { ! ! when ( ( $export ?? true ) && ! $isInvokable , 'export ' ) ! ! } const { ! ! $method ! ! } = ( @include ( 'wayfinder::function-arguments' ) ) : {
4
+ url : string ,
5
+ method : @js ( $verbs - > first ( ) - > actual ) ,
6
+ } => ( {
4
7
url : { ! ! $method ! ! } . url ( { ! ! when ( $parameters - > isNotEmpty ( ) , 'args, ' ) ! ! } options ) ,
5
8
method : @js ( $verbs - > first ( ) - > actual ) ,
6
9
} )
67
70
68
71
@foreach ( $verbs as $verb )
69
72
@include ( 'wayfinder::docblock' )
70
- { ! ! $method ! ! } . { ! ! $verb - > actual ! ! } = ( @include ( 'wayfinder::function-arguments' ) ) => ( {
73
+ { ! ! $method ! ! } . { ! ! $verb - > actual ! ! } = ( @include ( 'wayfinder::function-arguments' ) ) : {
74
+ url : string,
75
+ method : @js ( $verb - > actual ) ,
76
+ } => ( {
71
77
url : { ! ! $method ! ! } . url ( { ! ! when ( $parameters - > isNotEmpty ( ) , 'args , ') ! ! } options ) ,
72
78
method : @js ( $verb - > actual ) ,
73
79
} )
74
80
75
81
@endforeach
76
82
@if ( $withForm )
77
83
@include ( 'wayfinder::docblock' )
78
- const { ! ! $method ! ! } Form = ( @include ( 'wayfinder::function-arguments' ) ) => ( {
84
+ const { ! ! $method ! ! } Form = ( @include ( 'wayfinder::function-arguments' ) ) : {
85
+ action : string,
86
+ method : @js ( $verbs - > first ( ) - > formSafe ) ,
87
+ } => ( {
79
88
action : { ! ! $method ! ! } . url ( { ! ! when ( $parameters - > isNotEmpty ( ) , 'args , ') ! ! } @if ( $verbs - > first ( ) - > formSafe !== $verbs - > first ( ) - > actual )
80
89
{
81
90
[ options ?.mergeQuery ? 'mergeQuery ' : 'query '] : {
@@ -91,7 +100,10 @@ options
91
100
92
101
@foreach ( $verbs as $verb )
93
102
@include ( 'wayfinder::docblock' )
94
- { ! ! $method ! ! } Form . { ! ! $verb - > actual ! ! } = ( @include ( 'wayfinder::function-arguments' ) ) => ( {
103
+ { ! ! $method ! ! } Form . { ! ! $verb - > actual ! ! } = ( @include ( 'wayfinder::function-arguments' ) ) : {
104
+ action : string,
105
+ method : @js ( $verb - > formSafe ) ,
106
+ } => ( {
95
107
action : { ! ! $method ! ! } . url ( { ! ! when ( $parameters - > isNotEmpty ( ) , 'args , ') ! ! } @if ( $verb - > formSafe !== $verb - > actual )
96
108
{
97
109
[ options ?.mergeQuery ? 'mergeQuery ' : 'query '] : {
0 commit comments