spatie / laravel-webhook-client

Receive webhooks in Laravel apps
https://freek.dev/1383-sending-and-receiving-webhooks-in-laravel-apps
MIT License
985 stars 146 forks source link

Route caching fails when multiple routes use same configuration #209

Closed ryanlholt closed 5 months ago

ryanlholt commented 5 months ago

Description

If two or more routes use the same configuration name then route caching fails. According to this section of the README, multiple routes should be acceptable for a single webhook configuration. Looking in Spatie\WebhookClient\WebhookClientServiceProvider, it appears that the route macro simply appends the configuration name to magic string. This leads to non-unique names for routes which are a problem when routes are serialized during caching.

Steps To Reproduce

Screenshots

Screenshot 2024-04-22 at 11 43 52 AM Screenshot 2024-04-22 at 11 43 38 AM