{"id":14974958,"url":"https://github.com/bencoderus/laravel-webhook","last_synced_at":"2025-10-27T10:31:43.430Z","repository":{"id":62493097,"uuid":"350814165","full_name":"bencoderus/laravel-webhook","owner":"bencoderus","description":"Laravel webhook allows businesses to send webhooks to their merchants/clients with ease. ","archived":false,"fork":false,"pushed_at":"2021-03-27T13:11:40.000Z","size":228,"stargazers_count":23,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-09-28T19:41:43.994Z","etag":null,"topics":["composer","laravel","laravel8","php","php7","webhook"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bencoderus.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-23T18:19:29.000Z","updated_at":"2024-06-04T10:07:40.000Z","dependencies_parsed_at":"2022-11-02T09:45:25.454Z","dependency_job_id":null,"html_url":"https://github.com/bencoderus/laravel-webhook","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bencoderus%2Flaravel-webhook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bencoderus%2Flaravel-webhook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bencoderus%2Flaravel-webhook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bencoderus%2Flaravel-webhook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bencoderus","download_url":"https://codeload.github.com/bencoderus/laravel-webhook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219861468,"owners_count":16555994,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["composer","laravel","laravel8","php","php7","webhook"],"created_at":"2024-09-24T13:51:19.104Z","updated_at":"2025-10-27T10:31:43.004Z","avatar_url":"https://github.com/bencoderus.png","language":"PHP","readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"/images/preview.jpg\" alt=\"Laravel webhook preview\"\u003e\u003c/p\u003e\n\n# Laravel Webhook\n\n[![Latest Stable Version](https://poser.pugx.org/bencoderus/laravel-webhook/v)](//packagist.org/packages/bencoderus/laravel-webhook)\n[![License](https://poser.pugx.org/bencoderus/laravel-webhook/license)](//packagist.org/packages/bencoderus/laravel-webhook)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/bencoderus/laravel-webhook/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/bencoderus/laravel-webhook/?branch=master)\n[![Build Status](https://scrutinizer-ci.com/g/bencoderus/laravel-webhook/badges/build.png?b=master)](https://scrutinizer-ci.com/g/bencoderus/laravel-webhook/build-status/master)\n\nLaravel webhook allows businesses to send webhooks to their merchants/clients with ease. This package also introduces a\nnew artisan command to generate a webhook class.\n\n## Requirement\n\n- Composer v1.0/2.0\n- Php (7.3 and above)\n- Laravel (6 and above).\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require bencoderus/laravel-webhook\n```\n\n## Setup\n\nPublish basic components. (migrations and configuration files)\n\n``` php\nphp artisan webhook:install\n```\n\nRun migrations\n\n```bash\nphp artisan migrate\n```\n\n## Basic usage\n\nCreate a new webhook class\n\n```bash\nphp artisan make:webhook PaymentWebhook\n```\n\nCreates a new webhook class in App\\Http\\Webhooks\n\nYou can format your webhook payload like a resource.\n\n```php\npublic function data(): array\n    {\n        return [\n            'status' =\u003e $this-\u003estatus,\n            'amount' =\u003e $this-\u003eamount,\n            'currency' =\u003e 'USD',\n        ];\n    }\n```\n\n\u003cbr/\u003e\nSending a webhook.\n\n```php\n$transaction = Transaction::first();\n\n$webhook = new PaymentWebhook($transaction);\n$webhook-\u003eurl('https://httpbin.com')-\u003esend();\n```\n\nSending with an encrypted signature\n\n```php\n$transaction = Transaction::first();\n\n$webhook = new PaymentWebhook($transaction);\n$webhook-\u003eurl('https://httpbin.com')\n        -\u003ewithSignature('x-key', 'value_to_hash')\n        -\u003esend();\n````\n\nThe default hashing algorithm is sha512 you can change it by passing a different hashing algorithm as the third\nparameter for the withSignature method. PHP currently supports over 50 hashing algorithms.\n\nSending webhooks without using a Queue.\n\u003cbr/\u003e\nBy default, all webhooks are dispatched using a queue to facilitate webhook retrial after failure. You can also send\nwebhooks without using a Queue by passing ``false``  to the send method.\n\n```php\n$transaction = Transaction::first();\n\n$webhook = new PaymentWebhook($transaction);\n$webhook-\u003eurl('https://httpbin.com')-\u003esend(false);\n```\n\n### Testing\n\n``` bash\ncomposer test\n```\n\n## Configuration\n\n- You can enable or disable sending webhook via config/webhook.php.\n- You can also enable or disable logging webhook via config/webhook.php and more.\n\n### Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n### Security\n\nIf you discover any security related issues, please email me@biduwe.com instead of using the issue tracker.\n\n## Credits\n\n- [Benjamin Iduwe](https://github.com/bencoderus)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbencoderus%2Flaravel-webhook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbencoderus%2Flaravel-webhook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbencoderus%2Flaravel-webhook/lists"}