getecz/laravel-installer 问题修复 & 功能扩展

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

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

getecz/laravel-installer

最新稳定版本:v1.0.2

Composer 安装命令:

composer require getecz/laravel-installer

包简介

Getecz Laravel Installer – lightweight installer wizard for Laravel 12 applications

README 文档

README

A lightweight installer wizard package for Laravel 12 applications.

Features

  • Laravel 12 compatible
  • Tailwind CDN installer UI (no build tools required)
  • Server requirements check
  • Database connection validation
  • Writes .env from installer input
  • Generates APP_KEY
  • Runs migrations safely
  • Creates admin user
  • Locks installer after completion

Requirements

  • PHP 8.1+
  • Laravel 12
  • MySQL 5.7+ / MariaDB
  • Writable: storage/ and bootstrap/cache/

Install

1) Require the package

composer require getecz/laravel-installer

2) (Optional) Publish config / views

php artisan vendor:publish --tag=installer-config
php artisan vendor:publish --tag=installer-views

3) Enable automatic redirect to installer (Laravel 12)

In bootstrap/app.php add the middleware to the web group:

use Getecz\Installer\Http\Middleware\RedirectIfNotInstalled;
use Illuminate\Foundation\Configuration\Middleware;

return Application::configure(basePath: dirname(__DIR__))
    ->withRouting(
        web: __DIR__.'/../routes/web.php',
    )
    ->withMiddleware(function (Middleware $middleware) {
        $middleware->appendToGroup('web', RedirectIfNotInstalled::class);
    })
    ->create();

If you don't want auto-redirect, skip this step and manually visit /install.

Usage

  1. Upload your Laravel project to your server.
  2. Visit your site in a browser.
  3. If the app is not installed, you will be redirected to /install.
  4. Complete the steps.
  5. After installation, the installer locks automatically using the installed file:
    • storage/installed

Configuration

Publish config (optional) and edit config/installer.php.

Change post-install redirect

'redirect_after_install' => '/login'

Change user model

'user_model' => \App\Models\User::class

Map admin fields

If your users table has custom columns:

'admin_fields' => [
  'name' => 'full_name',
  'email' => 'email',
  'password' => 'password',
],
'admin_defaults' => [
  'is_admin' => 1,
  'role' => 'admin',
],

Security

  • Installer routes are blocked once the installed lock file exists.
  • Delete storage/installed to re-run the installer.

Routes

  • /install
  • /install/requirements
  • /install/database
  • /install/run
  • /install/admin
  • /install/finish

License

MIT

统计信息

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

GitHub 信息

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

其他信息

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