onramplab/laravel-webhooks
Composer 安装命令:
composer require onramplab/laravel-webhooks
包简介
The Laravel Webhook Package simplifies webhook dispatching in Laravel applications. It allows users to easily trigger webhooks, customize payload, set exclusion criteria, handle retries, and enhance security.
README 文档
README
The Laravel Webhook Package simplifies webhook dispatching in Laravel applications. It allows users to easily trigger webhooks, customize payload, set exclusion criteria, handle retries, and enhance security.
Requirements
- PHP >= 8.0;
- composer.
Features
Key features of the package include:
-
Webhook dispatching: Seamlessly dispatch webhooks to external services or perform custom actions based on events in your Laravel application.
-
Customizable payload: Empower users to define their own webhook payload, allowing them to include relevant data and tailor it to the requirements of the receiving service.
-
Exclusion criteria: Enable users to set exclusion criteria to selectively prevent certain events or conditions from triggering webhooks. This provides flexibility in determining which events should dispatch webhooks.
-
Retry mechanism: Implement a configurable retry mechanism to handle webhook dispatch failures, ensuring reliable delivery even in the face of temporary issues.
-
Security options: Incorporate optional authentication mechanisms such as headers or secrets to secure the webhooks and ensure they are only triggered by trusted sources.
-
Dynamic Custom Fields
Installation
composer require onramplab/laravel-webhooks
This will create a basic project structure for you:
- /build is used to store code coverage output by default;
- /src is where your codes will live in, each class will need to reside in its own file inside this folder;
- /tests each class that you write in src folder needs to be tested before it was even "included" into somewhere else. So basically we have tests classes there to test other classes;
- .gitignore there are certain files that we don't want to publish in Git, so we just add them to this fle for them to "get ignored by git";
- CHANGELOG.md to keep track of package updates;
- CONTRIBUTION.md Contributor Covenant Code of Conduct;
- LICENSE terms of how much freedom other programmers is allowed to use this library;
- README.md it is a mini documentation of the library, this is usually the "home page" of your repo if you published it on GitHub and Packagist;
- composer.json is where the information about your library is stored, like package name, author and dependencies;
- phpunit.xml It is a configuration file of PHPUnit, so that tests classes will be able to test the classes you've written;
- .travis.yml basic configuration for Travis CI with configured test coverage reporting for code climate.
Please refer to original article for more information.
Useful Tools
Running Tests:
php vendor/bin/phpunit
or
composer test
Code Sniffer Tool:
php vendor/bin/phpcs --standard=PSR2 src/
or
composer psr2check
Code Auto-fixer:
composer psr2autofix
composer insights:fix
rector:fix
Building Docs:
php vendor/bin/phpdoc -d "src" -t "docs"
or
composer docs
Changelog
To keep track, please refer to CHANGELOG.md.
Contributing
- Fork it.
- Create your feature branch (git checkout -b my-new-feature).
- Make your changes.
- Run the tests, adding new ones for your own code if necessary (phpunit).
- Commit your changes (git commit -am 'Added some feature').
- Push to the branch (git push origin my-new-feature).
- Create new pull request.
Also please refer to CONTRIBUTION.md.
License
Please refer to LICENSE.
onramplab/laravel-webhooks 适用场景与选型建议
onramplab/laravel-webhooks 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.31k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2023 年 07 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「package」 「laravel」 「webhook」 「laravle package」 「laravel webhooks」 「dispatch webhooks」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 onramplab/laravel-webhooks 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 onramplab/laravel-webhooks 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 onramplab/laravel-webhooks 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Inbox pattern process implementation for your Laravel Applications
Simple ASCII output of array data
GitHub Webhook Listener with plugin-based API for creating your own triggerered actions
Alfabank REST API integration
Package for view storage in laravel
统计信息
- 总下载量: 1.31k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-07-07