定制 eii/laravel-installer 二次开发

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

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

eii/laravel-installer

Composer 安装命令:

composer require eii/laravel-installer

包简介

A package to install Laravel applications with wizard steps.

README 文档

README

Latest Version on Packagist Total Downloads PHP Version Requirement Laravel Version License

Laravel Installer

This package features a multi-step wizard designed for a seamless Laravel application installation. It offers an intuitive interface that guides users through server requirement checks, environment configuration, database setup, and the creation of an initial admin user, all using Livewire components.

By including the Laravel installer in your application, you can eliminate the need to assist your clients with server setup. Clients can independently check server requirements, update the .env file, migrate the database, and link storage, all through a step-by-step installation guide.

Screenshots

laravel-installer step-1 laravel-installer step-2
laravel-installer step-3 laravel-installer step-4
laravel-installer step-5 laravel-installer step-6

✨ What's New in v2.0.0

1️⃣ Livewire 4 Support

  • Fully compatible with Livewire 4.x (now required).
  • Updated component registration to use namespace-based resolution (addNamespace).
  • Updated routing to use Route::livewire() syntax.
  • Added @livewireStyles / @livewireScripts to installer layout.
  • Fixed #[Layout] attribute syntax to use namespace-separated paths.

2️⃣ Bug Fixes

  • Fixed MailSettings::mount() incorrectly reading environment data instead of mail data.
  • Fixed undefined $data variable when mail step is optional.
  • Fixed admin password being persisted to the progress file.

3️⃣ Optional Force Overwrite

  • Added --force option to installer:install command for safer re-installation.
  • Without --force: preserves your customizations (views, config, assets are not overwritten).
  • With --force: prompts for confirmation before overwriting existing published files.

⚠️ Breaking Changes for v1.x Users

  • Livewire 3 is no longer supported. Upgrade to Livewire 4 before updating this package.
  • Published views/layouts from v1.x may need to be republished via php artisan installer:install.

✨ What’s New in v1.1.2

1️⃣ Loading State for Action Buttons

  • Added loading indicators to step action buttons (Next / Finish).
  • Improves user experience during time-consuming operations.
  • Clearly informs users that processing is in progress and prevents duplicate submissions.

2️⃣ Improved Environment Input Handling

  • Automatic trimming of input values to prevent validation errors caused by trailing spaces (common when copying & pasting).
  • Quoted environment values when saving to .env, ensuring:
    • SMTP passwords containing spaces work correctly
    • No unexpected server errors (HTTP 500) during mail configuration

3️⃣ Spatie Permission Compatibility

  • Added compatibility with spatie/laravel-permission
  • Ensures smooth integration for applications using role & permission management
  • Merged via PR #8 (thanks @vince844 🙌)

Features

  • Easy Installation: Easily Integrate in to your Laravel project.
  • Step-by-Step Wizard: User-friendly interface for guided installation.
  • Server Requirement Checks: Automatically verifies PHP version, extensions, and server configurations.
  • Environment Setup: Configures .env file with database credentials, app name, and other essentials.
  • Database Migration and Seeding: Runs migrations and seeds the database with initial data.
  • Link-Storage: Runs storage link (configurable).
  • Admin User Creation: Sets up a default administrator account securely.
  • Livewire Integration: Dynamic, real-time updates, data validations without page reloads.
  • Customizable: Easily extend or modify steps with additional livewire components to fit your application's needs.
  • Error Handling: Graceful error messages and rollback options for failed installations.

Requirements

  • PHP >= 8.2
  • Laravel >= 10.0
  • Composer >= 2.0
  • Livewire >= 4.0

Installation

  1. You can install the package via Composer:
composer require eii/laravel-installer
  1. After installation, publish the package's assets and configuration by running the install command:
php artisan installer:install
  1. Update the config/installer. (app_name, requirements, etc.)

Updating

If you are upgrading from a previous version or need to republish assets, run the command with the --force flag:

php artisan installer:install --force

💡 Using --force will prompt you for confirmation before overwriting existing files. Without this flag, your customizations are preserved.

Usage

  • Navigate to /install in your browser to start the wizard.
  • Follow the wizard steps to complete the installation.
  • The wizard steps are defined in the config/installer.php file. You can add, remove, or reorder steps as needed.
  • Modify the views published in resources/views/vendor/installer as needed.

Configuration

The configuration file is located at config/installer.php. Key options include:

  • lock_file: Path to the installation lock file to prevent re-running the installer.
  • redirect_after_install: URL to redirect to after successful installation.
  • requirements: Array of server requirements to check (e.g., PHP version, extensions like pdo_mysql).

Troubleshooting

  • Resetting the Installer: During development, you can reset the installation state by clearing sessions, progress, and lock files:
    php artisan installer:reset
  • Installation Fails on Requirements: Ensure your server meets the listed requirements. Check the Laravel documentation for setup guides.
  • Database Connection Issues: Verify your .env credentials and that the database server is running.
  • Livewire Not Working: Make sure Livewire is properly installed and assets are published.
  • For more help, check the issues on GitHub or open a new one.

Development

If you want to modify the styling of the installer, you can rebuild the CSS using Tailwind CSS:

  1. Install dependencies:

    npm install
  2. Build the assets:

    npm run build
  3. For real-time development:

    npm run watch

Contributing

Contributions are welcome! Please follow these steps:

  1. Contributions are welcome! Please follow these steps:
  2. Create a new branch (git checkout -b feature/YourFeature).
  3. Commit your changes (git commit -m 'Add YourFeature').
  4. Push to the branch (git push origin feature/YourFeature).
  5. Open a Pull Request.

We appreciate bug reports, feature requests, and code improvements.

License

This package is open-sourced software licensed under the MIT license.

Credits

Amit Haldar (Eii Tech Solutions https://eiitechsolutions.com)
Built with Laravel and Livewire

If you find this package useful, consider starring the repository on GitHub!

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

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

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-09-18