定制 trae/esign-module 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

trae/esign-module

最新稳定版本:v1.0.0

Composer 安装命令:

composer require trae/esign-module

包简介

A seamless E-Sign integration module for Laravel and Filament.

README 文档

README

<<<<<<< HEAD

Trae E-Sign Module

A seamless E-Sign integration module for Laravel and Filament, allowing you to easily add document signing capabilities (drawing and scanning signatures) to your existing Laravel projects.

Features

  • Digital Signatures: Draw or upload scanned signatures.
  • Document Management: Upload, manage, and delete documents.
  • Document Signing: Seamlessly sign PDF documents using stored signatures.
  • Filament Integration: Includes ready-to-use Filament resources for Documents and Signatures.
  • Livewire Components: Provides interactive UI components for signature creation and document signing.

Requirements

  • PHP 8.2+
  • Laravel 11.0+
  • Livewire 3.0+
  • Filament 3.0+ (optional, for admin panel)

Installation

Local Development / Testing

To use this package locally in another Laravel project (e.g., your cmms project) before publishing it to Packagist:

  1. Add a repository definition to your project's composer.json:
"repositories": [
    {
        "type": "path",
        "url": "../esgin_module",
        "options": {
            "symlink": true
        }
    }
]
  1. Require the package:
composer require trae/esign-module @dev

Via Composer (Once Published)

You can install the package via composer:

composer require trae/esign-module

1. Publish Assets and Migrations

Publish the database migrations and optionally the views:

php artisan vendor:publish --tag="esign-migrations"
php artisan vendor:publish --tag="esign-views"

2. Run Migrations

Run the migrations to create the signatures and documents tables:

php artisan migrate

Usage

Filament Admin Panel Integration

To use the E-Sign module within your Filament admin panel, register the plugin in your PanelProvider (e.g., app/Providers/Filament/AdminPanelProvider.php):

use Trae\ESign\Filament\ESignPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->plugin(ESignPlugin::make());
}

Frontend Integration (Livewire)

The module provides several Livewire components that you can include in your blade views:

  • @livewire('esign::create-signature'): UI for creating a new signature.
  • @livewire('esign::manage-signatures'): UI for listing and managing user signatures.
  • @livewire('esign::upload-document'): UI for uploading a new document to be signed.
  • @livewire('esign::sign-document', ['document' => $document]): UI for signing a specific document.

Example: Adding the signature creator to a page

<x-app-layout>
    <div class="py-12">
        <div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
            @livewire('esign::create-signature')
        </div>
    </div>
</x-app-layout>

Routes

The package automatically registers the following routes under the web, auth, and verified middleware:

  • esign/signatures/create (name: esign.signatures.create)
  • esign/documents/create (name: esign.documents.create)
  • esign/documents/{document}/sign (name: esign.documents.sign)
  • esign/documents/{document}/download (name: esign.documents.download)
  • esign/documents/{document}/view (name: esign.documents.view)

Configuration

By default, the package assumes your User model is App\Models\User and the table is users. If you use a different configuration, the package automatically uses Laravel's auth provider configuration (config('auth.providers.users.model')).

Backward Compatibility & Migrations

If you are migrating from the local cmms esign project to this module:

  1. Remove local files: Delete the local App\Models\Signature, App\Models\Document, Livewire components, and Filament resources from your main application.
  2. Database: The table structures remain identical. If you already have the tables, you do not need to run the module's migrations. Ensure you use the Trae\ESign\Models\Document and Signature models in your codebase instead of the local ones.

License

The MIT License (MIT).

esign-module

a902b0a5cdb2f6cbba45eff33c1c0478a37db132

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 5
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固