creagia / laravel-sign-pad Goto Github PK
View Code? Open in Web Editor NEWA Laravel package to sign documents and optionally generate certified PDFs associated with Eloquent models.
License: MIT License
A Laravel package to sign documents and optionally generate certified PDFs associated with Eloquent models.
License: MIT License
So the controller class for signature contains the following validation : $validatedData = $this->validate($request, [ 'model' => ['required'], 'sign' => ['required'], 'id' => ['required'], 'token' => ['required'], ]);
Which id
are we validating since the incoming request does not contain the id
data. I tried dd
for the incoming request and only the token,model, and sign
are available. As such my validation failed and I was brought to the previous page after submitting. Am I missing something?
The mouse pointer is not under the 'signature' - see the screenshoot
is that on purpose ?
new, clean Laravel 9 app, laravel Breeze, Tailwind css
blade-template:
<x-guest-layout>
<x-slot name="header">
<h2 class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">
{{ __('Dashboard') }}
</h2>
</x-slot>
<div class="py-12">
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
<div class="bg-white dark:bg-gray-800 overflow-hidden shadow-sm sm:rounded-lg">
<div class="p-6 text-gray-900 dark:text-gray-100">
@if (isset($myModel) && !$myModel->hasBeenSigned())
<form action="{{ $myModel->getSignatureRoute() }}" method="POST">
@csrf
<div style="text-align: center">
<x-creagia-signature-pad
border-color="#eaeaea"
pad-classes="rounded-xl border-2"
button-classes="bg-gray-100 px-4 py-2 rounded-xl mt-4"
clear-name="Clear"
submit-name="Submit"
/>
</div>
</form>
<script src="{{ asset('vendor/sign-pad/sign-pad.min.js') }}"></script>
@endif
</div>
</div>
</div>
</div>
</x-guest-layout>
Is there a way to save the signature via the back end controller?
I am including the signature pad on an existing form that creates a model instance when submitted.
That means that instead of the signature's submit button, the user would just submit the full form, and somehow the controller would save the signature, once it created the model.
I think that redirect_route_name
is missing in the config file and also som kind of mentioning in the doc on what one should do :)
Hi there,
Looks promising! Sorry to open an issue but the discussion doesn't seem to be opened yet.
Let's say I have a currently existant PDF or docx, with a defined area to sign. What is the quickest and easiest way to know the area coordinates and size in px to feed your package please?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.