emanate/nyundo 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

emanate/nyundo

Composer 安装命令:

composer require emanate/nyundo

包简介

License Manager

README 文档

README

Latest Stable Version Total Downloads License

Nyundo is a simple license management package for Laravel applications. it allows you to easily enforce license expiration, grace periods, and display customizable warning messages or expiration pages.

Installation

You can install the package via composer:

composer require emanate/nyundo

You can publish the config file with:

php artisan vendor:publish --tag="nyundo-config"

Configuration

Environment Variables

Add these variables to your .env file:

LICENSE_KEY="YOUR-LICENSE-KEY"
LICENSE_HOLDER="Your Company"
LICENSE_EXPIRATION_DATE="2025-12-31"
LICENSE_WARNING_DAYS=7
LICENSE_GRACE_PERIOD_DAYS=0
LICENSE_SUPPORT_PHONE="+2557123456789"
LICENSE_SUPPORT_EMAIL="support@example.com"
LICENSE_SUPPORT_HOURS="Monday - Friday, 9:00 AM - 5:00 PM"
NYUNDO_PASSWORD="your-strong-password"

Config File

This is the contents of the published config file:

return [
    'key' => env('LICENSE_KEY', null),
    
    'holder' => env('LICENSE_HOLDER', null),

    'warning_days' => (int) env('LICENSE_WARNING_DAYS', 7),

    'expiration_date' => env('LICENSE_EXPIRATION_DATE', null),
     
    'grace_period_days' => (int) env('LICENSE_GRACE_PERIOD_DAYS', 0),

    'support' => [
        'phone' => env('LICENSE_SUPPORT_PHONE', '+2557123456789'),
        'email' => env('LICENSE_SUPPORT_EMAIL', 'support@example.com'),
        'hours' => env('LICENSE_SUPPORT_HOURS', 'Monday - Friday, 9:00 AM - 5:00 PM'),
    ],

    'nyundo_password' => env('NYUNDO_PASSWORD', null),
];

Usage

Middleware

To enforce license checks, add the nyundo.check-license middleware to your routes in routes/web.php.

For example, you can add it to your login route to show warnings to your users before they log in:

Route::get('/login', [LoginController::class, 'showLoginForm'])
    ->middleware('nyundo.check-license')
    ->name('login');

Or protect an entire group of routes (this will redirect users to the expiration page if the license is fully expired):

Route::middleware(['nyundo.check-license'])->group(function () {
    Route::get('/dashboard', [DashboardController::class, 'index']);
});

CLI Commands

Status Check

Check your license status directly from the terminal:

php artisan nyundo:status

Apply License

Apply a new license securely via the command line. This requires the NYUNDO_PASSWORD to be set in your .env file. If you omit the --password flag, you will be prompted to enter it securely.

php artisan nyundo:renew \
    --license-key="ABC-123" \
    --expiry-date="2026-12-31" \
    --warning-days=10 \
    --grace-period=5

Customization

Displaying Warnings in your UI

The middleware automatically prepares messages for you. Add this snippet to your Blade templates (e.g., in your login or dashboard views) to display them.

Basic Example:

@if(session('nyundo_license_warning'))
    <div class="alert alert-warning">
        {{ session('nyundo_license_warning') }}
    </div>
@endif

Tailwind + Lucide Example:

@if(session('nyundo_license_warning') || session('nyundo_license_error'))
    <div class="mb-6 p-4 rounded-lg flex items-start gap-3 border {{ session('nyundo_license_error') ? 'bg-red-50 border-red-100 dark:bg-red-900/10 dark:border-red-800' : 'bg-amber-50 border-amber-100 dark:bg-amber-900/10 dark:border-amber-800' }}">
        <div class="shrink-0 p-1.5 rounded-full {{ session('nyundo_license_error') ? 'bg-red-100 text-red-600 dark:bg-red-900/30 dark:text-red-400' : 'bg-amber-100 text-amber-600 dark:bg-amber-900/30 dark:text-amber-400' }}">
            <i class="w-4 h-4" data-lucide="{{ session('nyundo_license_error') ? 'alert-octagon' : 'alert-triangle' }}"></i>
        </div>
        <div class="text-sm leading-relaxed {{ session('nyundo_license_error') ? 'text-red-800 dark:text-red-200' : 'text-amber-800 dark:text-amber-200' }}">
            <strong class="block mb-0.5">{{ session('nyundo_license_error') ? 'License Expired' : 'License Warning' }}</strong>
            {{ session('nyundo_license_error') ?? session('nyundo_license_warning') }}
        </div>
    </div>
@endif

Customizing the Expiration Page

If you want to customize the full-screen expiration page, publish the views:

php artisan vendor:publish --tag="nyundo-views"

The view will be published to resources/views/vendor/nyundo/expired.blade.php.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

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

emanate/nyundo 适用场景与选型建议

emanate/nyundo 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 159 次下载、GitHub Stars 达 1, 最近一次更新时间为 2025 年 12 月 15 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「laravel」 「emanate」 「nyundo」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 emanate/nyundo 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 emanate/nyundo 我们能提供哪些服务?
定制开发 / 二次开发

基于 emanate/nyundo 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-12-15