PHP code example of eom-plus / nova-signature

1. Go to this page and download the library: Download eom-plus/nova-signature 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/ */

    

eom-plus / nova-signature example snippets


use EomPlus\NovaSignature\Signature;

// ...

public function fields()
{
    return [
        // ...
        Signature::make('Signature'),
        // ...
    ];
}

Signature::make('Signature')
    ->color('black') // (string) Any css compatible value: "red", "rgb(0, 0, 0)", ...
    ->bgColor('white') // (string) Same as 'color'
    ->width('100%') // (string) Any css compatible value: "100%", "200px", ...
    ->height('250px') // (string) Same as 'width'
    ->asSvg() // Save image as SVG format, you can use asJpg() to save as JPEG instead. By default format is PNG.

// With validSignature() 
Signature::make('Signature')
    ->validSignature() // 'nullable' and 'signature' rules

// Your own rules
Signature::make('Signature')
    ->rules('signature', ...) 

php artisan vendor:publish --provider=EomPlus\NovaSignature\FieldServiceProvider --tags=translations