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

dynamic signing secret config #187

Closed syamsoul closed 1 year ago

syamsoul commented 1 year ago

i think it should be better if can set the signing key dynamically....

for example if i want to take signing secret key from database, i can do like this

return [
  'configs' => [
      [
          ....
          'signing_secret' => function(){
              return \App\Models\Variable::where('key', 'thirdpartyapp.signing_secret_key')->first()->value ?? null;
          },
      ]
  ]
];

hope can merge this pr.. or if have another better way, please make it happen.. thank you very much.... by the way, very appreciate for creating this nice package....🙏

freekmurze commented 1 year ago

I'm going to pass on this for now as having callable in configs will make them uncacheable.