PHP code example of savannabits / filament-signature-pad

1. Go to this page and download the library: Download savannabits/filament-signature-pad library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

savannabits / filament-signature-pad example snippets


use Coolsam\SignaturePad\Forms\Components\Fields\SignaturePad;

SignaturePad::make('my_signature'),

// Other methods
SignaturePad::make('signature')
    ->backgroundColor('white') // Set the background color in case you want to download to jpeg
    ->penColor('blue') // Set the pen color
    ->strokeMinDistance(2.0) // set the minimum stroke distance (the default works fine)
    ->strokeMaxWidth(2.5) // set the max width of the pen stroke
    ->strokeMinWidth(1.0) // set the minimum width of the pen stroke
    ->strokeDotSize(2.0) // set the stroke dot size.
    ->hideDownloadButtons() // In case you don't want to show the download buttons on the pad, you can hide them by setting this option.
bash
php artisan filament:assets
bash
php artisan vendor:publish --tag="signature-pad-translations"
bash
php artisan vendor:publish --tag="signature-pad-config"