murilochianfa/laravel-ioncube-helper

用于在您的Laravel项目中使用IonCube Loader的服务助手。

v1.0.0 2023-12-09 03:21 UTC

This package is auto-updated.

Last update: 2024-09-09 05:06:37 UTC


README

Banner

此Composer包简化了ionCube编码文件在Laravel项目中的集成,提供了方便的功能和实用工具来管理ionCube编码组件。

安装

您可以通过Composer安装此包

composer require murilochianfa/laravel-ioncube-helper

接下来,发布配置文件

php artisan vendor:publish --provider="MuriloChianfa\LaravelIoncubeHelper\IoncubeHelperServiceProvider"

依赖

  • Ioncube Loader 13.0或更高版本。
  • Laravel 10.0或更高版本。
  • PHP 8.2或更高版本。

用法

创建一个新的服务 App/Services/LicenseService.php

<?php

namespace App\Services;

use MuriloChianfa\LaravelIoncubeHelper\LicenseService as License;

final readonly class LicenseService extends License
{
    const LICENSE_PATH = '/path/to/license/license.txt';
}

您可以为从您的许可证中获取任何属性创建函数。

例如,在许可证创建时添加“模块”属性

make_license64... --property "Modules='foo,bar'"
<?php

namespace App\Services;

use MuriloChianfa\LaravelIoncubeHelper\LicenseService as License;

final readonly class LicenseService extends License
{
    const LICENSE_PATH = '/path/to/license/license.txt';

    public static function modules(): array
    {
        $modules = self::getProperty('Modules');
        return explode(',', $modules);
    }
}

重要

使用您的项目样式自定义 resources/views/vendor/license.blade.php 文件。

对质量的承诺

在包开发过程中,尽可能采用良好的设计和开发实践,以确保此包尽可能好。包开发的清单包括

  • ✅ 完全遵守PSR4和PSR12。
  • ✅ 在README.md中包含全面的文档。
  • ✅ 所有代码中无PHPCS警告。

测试

composer style

安全

如果您发现任何安全问题,请通过电子邮件murilo.chianfa@outlook.com联系,而不是使用问题跟踪器。

鸣谢

许可证

MIT许可证(MIT)。有关更多信息,请参阅许可证文件