Download the PHP package zisunal/laravel-installer without Composer
On this page you can find all versions of the php package zisunal/laravel-installer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zisunal/laravel-installer
More information about zisunal/laravel-installer
Files in zisunal/laravel-installer
Package laravel-installer
Short Description Highly customizable Laravel installer package
License mit
Informations about the package laravel-installer
๐ Laravel Installer
A clean, wizard-based installer for Laravel apps
Built with Livewire 4 + Spatie Livewire Wizard.
Features โข Quick Start โข Configuration โข Customization โข Security
โจ Overview
zisunal/laravel-installer provides a guided installation flow at /install (configurable) that helps you:
- collect database and environment details,
- validate runtime requirements,
- create the first admin user,
- run migrations and optional seeders,
- write
.envand config values, - lock the installer after completion.
It also includes middleware to redirect non-install routes to the installer until setup is complete.
๐ธ Installation Flow
Default ordered steps:
- Database (
WelcomeStep) - Requirements (
RequirementsStep) - Environment (
EnvironmentStep) - Admin User (
AdminUserStep) - Finish (
FinishStep)
๐ฅ Features
- โ Livewire wizard with visual progress
- โ Config-driven route prefix, middleware, and post-install redirect
- โ Runtime requirements check (PHP version, extensions, permissions)
- โ Optional app key generation, migration, and seeding
- โ Admin user bootstrap with configurable model + role attribute
- โ Automatic installer lock file support
- โ Step discovery for custom installer steps
- โ Middleware guard to force installation before app usage
โก Quick Start
1) Install package
2) Run setup command
Use
--forceto republish installer config:
3) Open installer UI
Visit:
Convenience tip: if you prepend
Zisunal\LaravelInstaller\Middleware\Installedinbootstrap/app.php, users are automatically redirected to the installer when the app is not installed yet.
Example:
๐ก Local Development Tip
When testing/using this package locally, use the PHP built-in server instead of composer run dev or php artisan serve. You can use composer run dev or php artisan once the installation is completed:
Why? The development servers (artisan serve, Vite hot-reload) restart when the .env file is modified. Since the installer writes to .env during finalization, server restarts break the installation workflow. The built-in server is stable and won't auto-restart on file changes.
โ ๏ธ Note: This is only a concern for local development. On production servers, the .env file is typically committed and static, so no restart occurs during installation.
๐งฉ What installer:setup does
The command:
- publishes
config/installer.php(installer-configtag), - ensures
InstallerServiceProvideris inbootstrap/providers.php, - generates app key (if empty and enabled),
- creates
public/storagelink (if enabled).
โ๏ธ Configuration
Publish config (if you have not done it already):
Key options in config/installer.php:
| Key | Purpose | Default |
|---|---|---|
enabled |
Enable/disable installer routes | true |
route_prefix |
Installer URI prefix | install |
redirect_after_install |
Redirect target after finish | /admin |
lock_file |
Installation lock file path | storage/app/installed.lock |
middleware |
Route middleware stack | ['web'] |
generate_app_key |
Auto-generate app key | true |
run_migrations |
Auto-run migrations | true |
run_seeders |
Auto-run seeders | true |
database_seeder |
Specific seeder class | null |
storage_link |
Create public storage symlink | true |
admin_model |
Model used for first admin | App\\Models\\User::class |
admin_role_attribute |
Role field name on model | role |
admin_role_value |
Role value assigned to admin | owner |
steps |
Manually registered step classes | package defaults |
providers_to_register |
Providers to append to bootstrap list | [] |
discover.enabled |
Auto-discover step classes | true |
discover.paths |
Discovery directories for custom Steps | [] |
๐ ๏ธ Customization
Custom installer URL
Custom redirect after install
Custom admin model + role behavior
Add providers during finalization
Add your own installer steps
Quick scaffold with Artisan
Generate a new installer step with Livewire component and view:
The command will ask you for:
- Installer step title โ e.g.
Redis Setup - Installer step description โ e.g.
Configure Redis connection settings. - Installer step order โ position in the wizard (1โ99), defaults to next available
- Where to create โ if auto-discovery is enabled, choose among discoverable paths; otherwise auto-placed in
app/Installer/Steps
This creates:
app/Installer/Steps/RedisSetupStep.php(Livewire component)resources/views/installer/steps/redis-setup.blade.php(view)
Then customize the component and view as needed.
Option A โ manual registration
Option B โ auto-discovery
Your step class must extend:
๐ง Runtime Behavior
On Finish, the installer manager will:
- finalize DB connection config in memory,
- run migrations (if enabled),
- run seeders (if enabled),
- create/update admin user,
- clear caches,
- write lock file,
- write environment/config values,
- register configured providers,
- redirect to configured destination.
๐ Security & Behavior
- Installer route is blocked when lock file exists.
- Global
installedmiddleware can redirect users to installer when app is not installed. - Sensitive values in summary (like passwords/tokens) are masked in preview.
๐งช Reset / Re-run Installer (Development)
To run the installer again in a dev environment, remove the lock file:
If needed, also republish config:
๐งท Route & Middleware Integration
- Routes are loaded automatically by the package service provider.
- Installer route name is:
installer.index. - Middleware alias registered by package:
installed.
Use it on your app routes when you want hard installation gating:
๐ค Contributing
Issues and pull requests are welcome.
If you contribute UI-related improvements, keep the wizard flow minimal, clear, and production-friendly.
๐ License
MIT
All versions of laravel-installer with dependencies
illuminate/support Version ^13.0
illuminate/filesystem Version ^13.0
illuminate/routing Version ^13.0
illuminate/console Version ^13.0
livewire/livewire Version ^4.0
spatie/laravel-livewire-wizard Version >2.0
winter/laravel-config-writer Version >1.2
laravel/prompts Version ^0.3.15
binafy/laravel-stub Version ^1.1