Laravel pad signature is a package to require a signature associated with an Eloquent model and optionally generate certified PDFs.
This package works by using a
RequiresSignature trait (provided by the package) on an Eloquent model you want to associate with a signature. Taken from the readme, that might look like the following:
6class Delivery extends Model
8 use RequiresSignature;
9 // ...
You can also generate PDF documents with the signature by implementing the package’s
ShouldGenerateSignatureDocument interface. You can use a blade file or a PDF file as the basis for the signature document template. See the readme for details.
Once you have the package set up, a blade component provides the needed HTML to render the signature pad (shown with customizations):
3 pad-classes="rounded-xl border-2"
4 button-classes="bg-gray-100 px-4 py-2 rounded-xl mt-4"
Once you’ve collected signatures from users, you can access the signature image and document on the model like so:
1// Get the signature image path
4// Get the signed document path
This package also supports certifying the PDF, and instructions are provided in the readme. You can learn more about this package, get full installation instructions, and view the source code on GitHub.