tapp/filament-webhook-client 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tapp/filament-webhook-client

最新稳定版本:v4.0.0

Composer 安装命令:

composer require tapp/filament-webhook-client

包简介

Add a Filament resource and a policy for Spatie Webhook client

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This plugin adds a Filament resource and a policy for Spatie Webhook Client.

Version Compatibility

Filament Filament Webhook Client
3.x 1.x
4.x 4.x

Installation

Important

First, make sure you have Spatie Webhook Client installed and configured.

You can install the package via Composer:

For Filament 3

composer require tapp/filament-webhook-client:"^1.0"

For Filament 4

composer require tapp/filament-webhook-client:"^4.0"

You can publish the config file with:

php artisan vendor:publish --tag="filament-webhook-client-config"

This is the contents of the published config file:

return [

    'resources' => [
        'WebhookCallResource' => \Tapp\FilamentWebhookClient\Resources\WebhookCallResource::class,
    ],

    'models' => [
        'webhook-call' => \Spatie\WebhookClient\Models\WebhookCall::class,
    ],

    'policies' => [
        'webhook-call' => \Tapp\FilamentWebhookClient\Policies\WebhookCallPolicy::class,
    ],

    'navigation' => [
        'sort' => 1,
        'icon' => 'heroicon-o-rectangle-stack',
    ],

];

Optionally, you can publish the translations file using:

php artisan vendor:publish --tag="filament-webhook-client-translations"

Usage

Add this plugin to a panel on plugins() method. E.g. in app/Providers/Filament/AdminPanelProvider.php:

use Tapp\FilamentWebhookClient\FilamentWebhookClientPlugin;
 
public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->plugins([
            FilamentWebhookClientPlugin::make(),
            //...
        ]);
}

Appareance

Webhook calls resource content example:

Filament Webhook Calls resource list

Webhook calls view content example:

Filament Webhook Calls view record

Webhook Call Policy

By default, the policy included in this plugin allows you to view the list of webhook calls and an individual webhook call. If you need to change the permissions, you can override the policy by creating a policy in you project and adding it on policies -> webhook-call entry on filament-webhook-client.php config file.

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

If you discover any security-related issues, please email security@tappnetwork.com.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 15.86k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 11
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 11
  • Watchers: 4
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-06-04