ambrosethebuild / laravel-installer
Laravel system install. Helps with checks before installing project on server
Package info
github.com/ambrosethebuild/laravel-installer
Language:Blade
pkg:composer/ambrosethebuild/laravel-installer
Fund package maintenance!
Requires
- php: ^8.0
- illuminate/contracts: ^10.0||^11.0||^12.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^10.0.0||^9.0.0||^8.22.0
- pestphp/pest: ^3.0
- pestphp/pest-plugin-arch: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
README
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
Publish Installer Styles
The installer ships with a pre-built, minified Tailwind CSS stylesheet. Publish it to your public directory:
php artisan vendor:publish --tag=laravel-installer-assets
This copies style.css to public/vendor/laravel-installer/style.css, which is what installer::installer.style links to. You do not need Tailwind installed in your own project for the installer UI to render correctly — the stylesheet is self-contained.
Testing
composer test
Building Styles (Maintainers)
The installer's UI is styled with Tailwind CSS, compiled ahead of time into resources/dist/style.css. If you change any classes in resources/views/**/*.blade.php or resources/css/installer.css, rebuild the stylesheet before committing:
npm install npm run build
Use npm run dev to watch for changes while editing views.