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*')) { header('Location: /installer'); exit; } }
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