ingoldsby/laravel-dashboard-display-webhook-tile
Composer 安装命令:
composer require ingoldsby/laravel-dashboard-display-webhook-tile
包简介
A tile to display webhooks for Laravel Dashboard
README 文档
README
This tile can be used on the Laravel Dashboard to display a webhook from your database.
Installation
You can install the package via composer:
composer require ingoldsby/laravel-dashboard-display-webhook-tile
This package uses spatie/laravel-webhook-client as the webhook provider.
Usage
In the dashboard config file, you must add this configuration in the tiles key. You can add a configuration in the configurations key per Webhook tile that you want to display. In this example, the webhook_calls table has been amended to capture the headers of the incoming request. Due to the formatting of the request, an offset is required (in this case, 0) to get the correct item.
// in config/dashboard.php return [ // ... 'tiles' => [ 'webhook' => [ 'configurations' => [ 'default' => [ 'column' => 'headers', 'value' => 'x-shopify-topic', 'offset' => 0, ] ], 'refresh_interval_in_seconds' => 60, ] ], ];
This example shows multiple configurations, with the second one named payload, matching the default column in the webhook_calls table. Note: the default column in this example does not need an offset so it is not included.
// in config/dashboard.php return [ // ... 'tiles' => [ 'webhook' => [ 'configurations' => [ 'default' => [ 'column' => 'headers', 'value' => 'x-shopify-topic', 'offset' => 0, ], 'payload' => [ 'column' => 'payload', 'value' => 'id', ], ], 'refresh_interval_in_seconds' => 60, ] ], ];
In app\Console\Kernel.php you should schedule the \Ingoldsby\DisplayWebhookTile\Commands\FetchDisplayWebhookCommand to run. You can decide the frequency of running the command.
// in app/console/Kernel.php protected function schedule(Schedule $schedule) { // ... $schedule->command(\Ingoldsby\DisplayWebhookTile\Commands\FetchDisplayWebhookCommand::class)->everyMinute(); }
To display webhook details of another configuration, simply add the name of the configuration as an arugment.
// in app/console/Kernel.php protected function schedule(Schedule $schedule) { // ... $schedule->command(\Ingoldsby\DisplayWebhookTile\Commands\FetchDisplayWebhookCommand::class, ['alternate-configuration-name'])->everyMinute(); }
In your dashboard view you can use the tile:
livewire:display-webhook-tile
<x-dashboard> <livewire:display-webhook-tile position="a1" /> </x-dashboard>
To display webhook details of another configuration, pass the name of the configuration to the configuration-name prop.
<x-dashboard> <livewire:display-webhook-tile position="a1" configuration-name="alternate-configuration-name" /> </x-dashboard>
The default title of the tile will be Latest Webhook unless you pass a string using the title prop.
<x-dashboard> <livewire:display-webhook-tile position="a1" configuration-name="alternate-configuration-name" title="Title of tile" /> </x-dashboard>
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email instead of using the issue tracker.
Support Spatie
I have learnt a lot from Spatie's various packages, including Mailcoach, and would recommend you check them out if you want to know more.
Learn how to create a package like theirs, by watching Spatie's premium video course:
Spatie invest a lot of resources into creating best in class open source packages. You can support them by buying one of their paid products.
Credits
License
The MIT License (MIT). Please see License File for more information.
ingoldsby/laravel-dashboard-display-webhook-tile 适用场景与选型建议
ingoldsby/laravel-dashboard-display-webhook-tile 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 8 次下载、GitHub Stars 达 0, 最近一次更新时间为 2020 年 06 月 26 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「ingoldsby」 「laravel-dashboard-display-webhook-tile」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 ingoldsby/laravel-dashboard-display-webhook-tile 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ingoldsby/laravel-dashboard-display-webhook-tile 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 ingoldsby/laravel-dashboard-display-webhook-tile 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
统计信息
- 总下载量: 8
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 7
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-06-26
