skuzalabs/filament-signature-pad
最新稳定版本:v1.0.4
Composer 安装命令:
composer require skuzalabs/filament-signature-pad
包简介
Signature Pad Field for Filamentphp Forms
README 文档
README
A Signature Pad Field for the FilamentPHP Form Builder using szimek/signature_pad
Installation
You can install the package via composer:
composer require skuzalabs/filament-signature-pad
Usage
You can now use the SignaturePad field in your form builder.
use Skuzalabs\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 Skuzalabs\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 ]); }
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
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 17
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-03-10

