File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,12 +77,14 @@ public function workflowId()
7777 public function webhookUrl (string $ signalMethod = '' ): string
7878 {
7979 $ basePath = config ('workflows.webhooks_route ' , '/webhooks ' );
80+ $ workflow = Str::kebab (class_basename ($ this ->storedWorkflow ->class ));
81+
8082 if ($ signalMethod === '' ) {
81- $ workflow = Str::kebab (class_basename ($ this ->storedWorkflow ->class ));
8283 return url ("{$ basePath }/ {$ workflow }" );
8384 }
85+
8486 $ signal = Str::kebab ($ signalMethod );
85- return url ("{$ basePath }/signal/ {$ this ->storedWorkflow ->id }/ {$ signal }" );
87+ return url ("{$ basePath }/signal/ {$ workflow } / { $ this ->storedWorkflow ->id }/ {$ signal }" );
8688 }
8789
8890 public function handle ()
Original file line number Diff line number Diff line change @@ -131,6 +131,6 @@ public function testWebhookUrl(): void
131131 ]);
132132
133133 $ this ->assertSame ('http://localhost/webhooks/test-workflow ' , $ activity ->webhookUrl ());
134- $ this ->assertSame ('http://localhost/webhooks/signal/1/other ' , $ activity ->webhookUrl ('other ' ));
134+ $ this ->assertSame ('http://localhost/webhooks/signal/test-workflow/ 1/other ' , $ activity ->webhookUrl ('other ' ));
135135 }
136136}
You can’t perform that action at this time.
0 commit comments