tomatophp/filament-withdrawals

在 FilamentPHP 中管理您的钱包提款

v1.0.1 2024-09-07 12:11 UTC

This package is auto-updated.

Last update: 2024-09-23 11:25:54 UTC


README

Screenshot

Filament 提款

Latest Stable Version License Downloads

在 Filament 中管理您的提款

安装

composer require tomatophp/filament-withdrawals

安装您的包后,请运行此命令

php artisan filament-withdrawals:install

最后在 /app/Providers/Filament/AdminPanelProvider.php 上注册插件

->plugin(\TomatoPHP\FilamentWithdrawals\FilamentWithdrawalsPlugin::make())

屏幕截图

Withdrawal Methods Withdrawal Methods Fields Withdrawal Methods Requests Withdrawal Requests Withdrawal Requests View Withdrawal Requests Edit

添加表单字段类型

您可以通过在您的提供者上使用此方法向表单构建器添加更多字段。

use TomatoPHP\FilamentWithdrawals\Services\FilamentWithdrawalFormFields;
use TomatoPHP\FilamentWithdrawals\Services\Contracts\WithdrawalFormFieldType;

FilamentWithdrawalFormFields::register([
    WithdrawalFormFieldType::make('code')
        ->className(CodeEditor::class)
        ->color('warning')
        ->icon('heroicon-s-code-bracket-square')
        ->label('Code Editor'),
]);

使用您的表单构建器

创建您的表单后,您可以通过 id 使用它,如下所示

use TomatoPHP\FilamentWithdrawals\Services\FilamentWithdrawalFormBuilder;

FilamentWithdrawalFormBuilder::make(1)->build()

使用表单请求提交您的表单数据

您可以通过在您的提供者上使用此方法使用表单请求提交您的表单数据。

use TomatoPHP\FilamentWithdrawals\Services\FilamentWithdrawalFormBuilder;

FilamentWithdrawalFormBuilder::make(1)->send($data)

发布资产

您可以使用此命令发布语言文件

php artisan vendor:publish --tag="filament-withdrawals-lang"

您可以使用此命令发布迁移文件

php artisan vendor:publish --tag="filament-withdrawals-migrations"

其他 Filament 包

查看我们的 Awesome TomatoPHP