定制 souravmsh/laravel-installer 二次开发

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

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

souravmsh/laravel-installer

Composer 安装命令:

composer require souravmsh/laravel-installer

包简介

A sleek and easy-to-use web-based installer for Laravel applications.

README 文档

README

Version Software License

A sleek, modern, and easy-to-use web-based installer for Laravel applications. This package provides a step-by-step wizard to help users set up your Laravel application, including environment configuration, database connection, and license validation.

Features

  • Standard Requirements Check: Verifies PHP version and required extensions.
  • Permissions Check: Ensures necessary directories are writable.
  • Environment Configuration: Easy setup for .env variables.
  • Database Setup: Wizard for database connection and migration.
  • License Validation: Flexible support for license key validation (Required, Optional, or Disabled).
  • Modern Mobile-App UI: Sleek, glassmorphism-based design optimized for clarity and ease of use.

Installation

You can install the package via composer:

composer require souravmsh/laravel-installer

Setup

1. Register the Service Provider (Optional for Laravel 5.5+)

The package will automatically register itself using Laravel's package discovery.

2. Publish Configuration and Assets

You can publish the configuration file and views using the following commands:

Publish All:

php artisan vendor:publish --tag="laravel-installer-publish"

Publish Configuration Only:

php artisan vendor:publish --tag="laravel-installer-config"

Publish Views Only:

php artisan vendor:publish --tag="laravel-installer-views"

3. Middleware

The package provides two middlewares:

  • installer.check: Ensures the application is installed before allowing access.
  • installer.redirect: Redirects to the homepage if the application is already installed.

You should apply these to your routes as needed.

The configuration file is located at config/laravel_installer.php. You can customize the application name, license server, and other settings here.

return [
    'app_name' => env('APP_NAME', 'Laravel Application'),

    // Enable or disable the installer entirely
    'installer_enabled' => env('INSTALLER_ENABLED', true),

    // Force redirection to the installer when the app is uninstalled
    'force_install_redirect' => env('INSTALLER_FORCE_REDIRECT', true),

    // Path to the installation lock file
    'installed_key_path' => env('INSTALLER_KEY_PATH', 'app/private/key.install'),

    // Supported: "required", "optional", "disabled"
    'license_check' => env('INSTALLER_LICENSE', 'optional'),

    'license_server_url' => env('INSTALLER_LICENSE_URL', 'null'),
    'license_storage_path' => env('INSTALLER_LICENSE_KEY_PATH', 'app/private/key.private'),
];

Usage

Once installed, navigate to /install to begin the installation process. The installer will guide you through:

  1. Welcome Screen
  2. Server Requirements Check
  3. Directory Permissions Check
  4. Environment Configuration
  5. Database Setup
  6. License Validation
  7. Installation Completion

Commands

Install Package

Use this command to install the package and publish its configuration file to your host application. Note: The configuration is also automatically copied when the package is required via Composer (Zero-Touch publish).

php artisan laravel-installer:install

Reset / Fresh Install

Use this command to tear down the current installation and return the application to setup mode. It is safe to run at any time — it includes a confirmation prompt to prevent accidental resets.

php artisan laravel-installer:reset

The command runs three sequential steps:

Step Action
1. Fix permissions Sets write permissions on .env (664), storage/ (775 recursive), bootstrap/cache/ (775), and storage/app/private/ (775). Creates missing directories automatically.
2. Remove lock files Deletes the install lock file (key.install) and the license key file (key.private) if they exist. Prints the resolved path of each so you can verify.
3. Clear all caches Runs optimize:clear which flushes config, route, view, event, and compiled bootstrap caches — including bootstrap/cache/config.php that individual cache:clear calls miss.

After the command completes, the installer.check middleware will detect the missing lock file and redirect all protected routes to the setup wizard.

Note: If INSTALLER_ENABLED=false is set in your .env, the middleware bypasses the lock-file check entirely. The command will warn you if this is the case — set INSTALLER_ENABLED=true to re-enable setup mode.

Security

If you discover any security-related issues, please email sourav.diubd@gmail.com instead of using the issue tracker.

Credits

License

Proprietary License. Please see License File for more information.

souravmsh/laravel-installer 适用场景与选型建议

souravmsh/laravel-installer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 25 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 04 月 12 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: proprietary
  • 更新时间: 2026-04-12