定制 gprabesh/filament-signature-pad 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

gprabesh/filament-signature-pad

Composer 安装命令:

composer require gprabesh/filament-signature-pad

包简介

Signature Pad Field for Filamentphp Forms

README 文档

README

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

img.png

A Signature Pad Field for the FilamentPHP Form Builder using szimek/signature_pad

Installation

You can install the package via composer:

composer require savannabits/filament-signature-pad

Usage

You can now use the SignaturePad field in your form builder.

    use Gprabesh\SignaturePad\Forms\Components\Fields\SignaturePad;
    public static function form(Form $form): Form
    {
        return $form
            ->schema([
                // ... Other fields
                SignaturePad::make('signature'), // Chain your field modifiers here
                // Other fields
            ]);
    }

You can also set the Signature Pad Options as shown below. See SignaturePad Options Docs for more details.

    use Gprabesh\SignaturePad\Forms\Components\Fields\SignaturePad;
    public static function form(Form $form): Form
    {
        return $form
            ->schema([
                // ... Other fields
                SignaturePad::make('signature')
                    ->strokeMinWidth(1.0)
                    ->strokeMaxWidth(2.5)
                    ->strokeDotSize(2.0)
                    ->penColor('rgb(0,0,255)') // Blue
                    ->backgroundColor('rgba(0,0,0,0)'), // Black Transparent
                // Other fields
            ]);
    }

img_1.png

Upon Saving, the signature image is saved to the database as a png data url. Plans are underway to also support uploading the signature to the server as an image blob file.

Testing

composer test

Changelog

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

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 34
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-07-29