xgenious/installer 问题修复 & 功能扩展

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

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

xgenious/installer

Composer 安装命令:

composer require xgenious/installer

包简介

Laravel script installer package

README 文档

README

A Laravel package for installing xgenious script easily with a visual installer

Requirements:

  • PHP >= 8.3
  • Laravel >= 13.0
image

Installation

Require this package with composer:

composer require xgenious/installer

Publish the configuration file::

php artisan vendor:publish --provider="Xgenious\Installer\InstallerServiceProvider" --tag="config"

Add Midleware in app\Http\Kernel.php file

\Xgenious\Installer\Http\Middleware\InstallerMiddleware::class

example
  protected $middleware = [
        /* Laravel defult middleware */
        \Xgenious\Installer\Http\Middleware\InstallerMiddleware::class
    ];

Config Value Explanation

# config/installer.php

return [
    'app_name' => 'Fundorex', //app name 
    'super_admin_role_id' => 3, // super admin role id
    'admin_model' => \App\Admin::class, //admin modal 
    'admin_table' => 'admins', //admin table
    'multi_tenant' => false,
    'author' => 'xgenious', // envato author username
    'product_key' => '8de1f072836b127749b7aa2b575ffc0002ade20e', //product key from xgenious license server
    'php_version' => '8.3', //minimum required php version
    'database_type' => 'mysql', // mysql or pgsql (depending on product database type)
    'extensions' => ['BCMath', 'Ctype', 'JSON', 'Mbstring', 'OpenSSL', 'PDO', 'pdo_mysql', 'Tokenizer', 'XML', 'cURL', 'fileinfo'], //required php extensions
    'website' => 'https://xgenious.com', //author website url
    'email' => 'support@xgenious.com', //support url
    'env_example_path' => public_path('env-sample.txt'), //env-sample.txt file locaation, env will be generate based on this file contenant
    'broadcast_driver' => 'log', // default config value 
    'cache_driver' => 'file', // default config value 
    'queue_connection' => 'sync', // default config value 
    'mail_port' => '587', // default config value 
    'mail_encryption' => 'tls', // default config value 
    'model_has_roles' => true,
    'bundle_pack' => false, //if the product has bundle pack
    'bundle_pack_key' => 'dsfasd', //bundle pack product key
];

Migrate from old Installer

remove install folder, and remove install folder redirection from the root index.php file

Minimal .env File Required

here is example of minimal .env file.

APP_NAME=Fundorex
APP_ENV=production
APP_KEY=base64:8e5wSFpua5CzuHhXJEaJHcpRFBR2nqLAV0zTURuXgLA=
APP_DEBUG=false
APP_URL=http://fundorex.test/

Running Tests

To run the test suite for this package, follow these steps:

Ensure you have the package and its dependencies installed:

composer install

Copy the package's phpunit.xml.dist file to phpunit.xml:

cp phpunit.xml.dist phpunit.xml

Run the tests using PHPUnit:

./vendor/bin/phpunit

Or, if you've set up the Composer script, you can use:

composer test

For a coverage report, run:

./vendor/bin/phpunit --coverage-html coverage

This will generate an HTML coverage report in the coverage directory.

Notes:

The tests use an in-memory SQLite database by default. If you need to use a different database for testing, update the phpunit.xml file accordingly.

Some tests may require specific environment variables to be set. Check the phpunit.xml file and set any necessary variables in your local environment or in the phpunit.xml file.

If you encounter any issues running the tests, ensure that all dependencies are properly installed and that your PHP environment meets the package requirements.

Writing New Tests

When adding new features or fixing bugs, please add corresponding test cases. Place new test files in the tests directory, following the existing structure:

Unit tests go in tests/Unit Feature tests go in tests/Feature

Ensure that your test class extends Xgenious\Installer\Tests\TestCase.

If you need to add new test dependencies, add them to the require-dev section of the composer.json file.

Usages

When the .env file is not found in your Laravel application, this package will automatically display the installation wizard.

xgenious/installer 适用场景与选型建议

xgenious/installer 是一款 基于 Blade 开发的 Composer 扩展包,目前已累计 3.33k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2024 年 07 月 03 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-2-Clause
  • 更新时间: 2024-07-03