Download the PHP package creagia/laravel-sign-pad without Composer

On this page you can find all versions of the php package creagia/laravel-sign-pad. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-sign-pad

Laravel pad signature

A Laravel package to sign documents and optionally generate certified PDFs associated to a Eloquent model.

Latest Version on Packagist GitHub Tests Action Status Total Downloads

Support us

Laradir banner

Requirements

Laravel pad signature requires PHP 8.0, 8.1, 8.2 or 8.3 and Laravel 8, 9, 10 or 11.

Installation

You can install the package via composer:

Publish the config and the migration files and migrate the database

Publish the .js assets:

This will copy the package assets inside the public/vendor/sign-pad/ folder.

Configuration

In the published config file config/sign-pad.php you'll be able to configure many important aspects of the package, like the route name where users will be redirected after signing the document or where do you want to store the signed documents. You can customize the disk and route to store signatures and documents.

Notice that the redirect_route_name will receive the parameter $uuid with the uuid of the signature model in the database.

Preparing your model

Add the RequiresSignature trait and implement the CanBeSigned class to the model you would like.

If you want to generate PDF documents with the signature, you should implement the ShouldGenerateSignatureDocument class . Define your document template with the getSignatureDocumentTemplate method.

A $model object will be automatically injected into the Blade template, so you will be able to access all the needed properties of the model.

Usage

At this point, all you need is to create the form with the sign pad canvas in your template. For the route of the form, you have to call the method getSignatureRoute() from the instance of the model you prepared before:

Retrieving signatures

You can retrieve your model signature using the Eloquent relation $myModel->signature. After that, you can use:

Deleting signatures

You can delete your model signature using

Customizing the component

From the same template, you can change the look of the component by passing some properties:

An example with an app using Tailwind would be:

Certifying the PDFs

To certify your signature with TCPDF, you will have to create your own SSL certificate with OpenSSL. Otherwise you can find the TCPDF demo certificate here : TCPDF Demo Certificate

To create your own certificate use this command :

More information in the TCPDF documentation

After generating the certificate, you'll have to change the value of the variable certify_documents in the config/sign-pad.php file and set it to true.

When the variable certify_documents is set to true, the package will search the file allocated in the certificate_file path to sign the documents. Feel free to modify the location or the name of certificate file by changing its value.

Inside the same config/sign-pad.php we encourage you to fill all the fields of the array certificate_info to be more specific with the certificate.

Finally, you can change the certificate type by modifying the value of the variable cert_type (by default 2). You can find more information about certificates types at TCPDF setSignature reference.

Upgrading

See UPGRADING for details.

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-sign-pad with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
illuminate/contracts Version ^8.0|^9.0|^10.0|^11.0
spatie/laravel-package-tools Version ^1.12.1
setasign/fpdi Version ^v2.0.0
tecnickcom/tcpdf Version ^6.6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package creagia/laravel-sign-pad contains the following files

Loading the files please wait ....