Laravel Community Tools by Tighten
Laravel Nova icon Nova Packages

Readme

Laravel Nova Signature

This Nova field lets you save a signature as a field for your resource.

Behind the scenes WangShayne/vue-signature is used.

screenshot of nova signature

Installation

composer require lab404/nova-signature

Usage

In your nova resource make the field Lab404\NovaSignature\NovaSignature. This field fits perfectly with a TEXT column and can be used both for resources and actions.

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

Configuration

Showed example values are the default ones.

NovaSignature::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'
    ->saveOnChanges() // () Save the signature at every change and it will hide the Attach button

Validation

You can use the signature validation rules to check if the signature is valid. We also provide the validSignature method that adds nullable and signature rules.

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

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

Licence

MIT

Reviews

By ltd300 on February 26, 2021

Excellent!! If what you are looking for is a signature pad, this is the best way to do it. it has the right size for signature and and very easy to incorporate. I was using the "Signature field from Olav van Schie " but it has to much space to write so it is hard to place it in the proper space. And because it is not a pop up it is much easy to work just like another field. Thanks MarceauKa, Keep it up!!

Back to Top
Added 6 years ago
Last updated 6 Years Ago
Version 1.1.0
Composer
lab404/nova-signature
GitHub stars 14
Packagist downloads 74,848

Favorites

10 users favorited

Rating

5.00
(out of 5)
★★★★★
★★★★
★★★
★★
1 ratings

Tags

Brought to you by Tighten

Issues/Feature Requests Stats Package Ideas