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
.envfrom 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/andbootstrap/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
- Upload your Laravel project to your server.
- Visit your site in a browser.
- If the app is not installed, you will be redirected to
/install. - Complete the steps.
- 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/installedto 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
其他信息
- 授权协议: MIT
- 更新时间: 2025-12-15