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

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

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

ambrosethebuild/laravel-installer

最新稳定版本:1.0.21

Composer 安装命令:

composer require ambrosethebuild/laravel-installer

包简介

Laravel system install. Helps with checks before installing project on server

README 文档

README

Laravel Installer Banner

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Laravel Installer

A beautiful, step-by-step installer for Laravel projects. This package helps you verify your server environment, check required PHP extensions and folder permissions, edit your .env file, and run migrations—all before your app goes live.

Features:

  • System requirements and PHP extension checks
  • Folder permission checks
  • Easy .env editor
  • Database migration runner
  • Modern, responsive UI (no external CSS dependencies)
  • Progress is tracked and resumable

Get your Laravel app production-ready with confidence and ease!

Installation

You can install the package via composer:

composer require ambrosethebuild/laravel-installer

You can publish the config file with:

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

This is the contents of the published config file:

return [
    'required_extensions' => [
        'openssl', 'pdo', 'mbstring', 'tokenizer', 'xml', 'ctype', 'json', 'bcmath',
    ],
    'folders' => [
        'storage/logs',
        'bootstrap/cache',
        'storage/framework',
    ],
];

Usage

To automatically redirect users to the installer until it is completed, you can add the following check in the boot method of your App\Providers\AppServiceProvider.php:

use AmbroseTheBuild\LaravelInstaller\LaravelInstaller;

public function boot(): void
{
    if (!app()->runningInConsole() && !LaravelInstaller::isInstalled() && !request()->is('installer*')) {
        redirect('/installer/welcome')->send();
    }
}

This will ensure that all web requests are sent to the installer wizard until the installation is finished. Once completed, a flag file is created in your storage directory, and this redirect will no longer trigger.

Tailwind CSS Configuration (Important)

If your Laravel project uses Tailwind CSS and you are running npm run build or npm run prod, you must add the package's views to your tailwind.config.js file. This prevents the styles used in the installer from being purged during the production build:

/** @type {import('tailwindcss').Config} */
export default {
    content: [
        // ... your other content paths
        './vendor/ambrosethebuild/laravel-installer/resources/views/**/*.blade.php',
    ],
    // ...
}

Publish Fonts

After installation, publish the Poppins font files to your public directory:

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

Testing

composer test

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-22