PHPackages                             zisunal/laravel-installer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. zisunal/laravel-installer

ActiveLibrary[Framework](/categories/framework)

zisunal/laravel-installer
=========================

Highly customizable Laravel installer package

2.0.2(1mo ago)3231↓46.2%mitPHPPHP ^8.2

Since Mar 23Pushed 1mo agoCompare

[ Source](https://github.com/zisunal/laravel-installer)[ Packagist](https://packagist.org/packages/zisunal/laravel-installer)[ RSS](/packages/zisunal-laravel-installer/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (9)Dependencies (18)Versions (10)Used By (0)

🚀 Laravel Installer
===================

[](#-laravel-installer)

 **A clean, wizard-based installer for Laravel apps**
 Built with Livewire 4 + Spatie Livewire Wizard.

 [Features](#-features) • [Quick Start](#-quick-start) • [Configuration](#-configuration) • [Customization](#-customization) • [Security](#-security--behavior)

 [![PHP](https://camo.githubusercontent.com/ccaa43fc634d348cffccb1d8db7b55d9f17c5d46944bc99a15c3c982724b387d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322532422d3737374242343f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/ccaa43fc634d348cffccb1d8db7b55d9f17c5d46944bc99a15c3c982724b387d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322532422d3737374242343f6c6f676f3d706870266c6f676f436f6c6f723d7768697465) [![Laravel](https://camo.githubusercontent.com/bc35de9dde195e6f9f6afbef89d5a571e598d7e04148eecf91f555a7f782fc0e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31322e782d4646324432303f6c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/bc35de9dde195e6f9f6afbef89d5a571e598d7e04148eecf91f555a7f782fc0e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31322e782d4646324432303f6c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465) [![Livewire](https://camo.githubusercontent.com/c255be6a6bd5d81e77b1fae64e389f07233f9ebde78010879c23ed71f9a313a1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c697665776972652d342e782d3445353641363f6c6f676f3d6c69766577697265266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/c255be6a6bd5d81e77b1fae64e389f07233f9ebde78010879c23ed71f9a313a1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c697665776972652d342e782d3445353641363f6c6f676f3d6c69766577697265266c6f676f436f6c6f723d7768697465) [![License](https://camo.githubusercontent.com/5caa455d8debc46fb23abbadb45a733a937f3910a73fc875c2f7820468e1bb54/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e)](https://camo.githubusercontent.com/5caa455d8debc46fb23abbadb45a733a937f3910a73fc875c2f7820468e1bb54/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e)

---

✨ Overview
----------

[](#-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 `.env` and 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
-------------------

[](#-installation-flow)

 ```
flowchart LR
		A[Database Setup] --> B[Requirements Check]
		B --> C[Environment Setup]
		C --> D[Admin User]
		D --> E[Finish & Finalize]
		E --> F[Write .env + config]
		F --> G[Run migrate/seed]
		G --> H[Create lock file]
		H --> I[Redirect after install]
```

      Loading Default ordered steps:

1. **Database** (`WelcomeStep`)
2. **Requirements** (`RequirementsStep`)
3. **Environment** (`EnvironmentStep`)
4. **Admin User** (`AdminUserStep`)
5. **Finish** (`FinishStep`)

---

🔥 Features
----------

[](#-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
-------------

[](#-quick-start)

### 1) Install package

[](#1-install-package)

```
composer require zisunal/laravel-installer
```

### 2) Run setup command

[](#2-run-setup-command)

```
php artisan installer:setup
```

> Use `--force` to republish installer config:

```
php artisan installer:setup --force
```

### 3) Open installer UI

[](#3-open-installer-ui)

Visit:

```
/install

```

> Convenience tip: if you prepend `Zisunal\LaravelInstaller\Middleware\Installed` in `bootstrap/app.php`, users are automatically redirected to the installer when the app is not installed yet.

Example:

```
->withMiddleware(function (Middleware $middleware): void {
	$middleware->prepend(\Zisunal\LaravelInstaller\Middleware\Installed::class);
})
```

---

💡 Local Development Tip
-----------------------

[](#-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:

```
php -S localhost:8000 -t public
```

**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
-----------------------------

[](#-what-installersetup-does)

The command:

- publishes `config/installer.php` (`installer-config` tag),
- ensures `InstallerServiceProvider` is in `bootstrap/providers.php`,
- generates app key (if empty and enabled),
- creates `public/storage` link (if enabled).

---

⚙️ Configuration
----------------

[](#️-configuration)

Publish config (if you have not done it already):

```
php artisan vendor:publish \
	--provider="Zisunal\\LaravelInstaller\\InstallerServiceProvider" \
	--tag="installer-config"
```

Key options in `config/installer.php`:

KeyPurposeDefault`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 classespackage 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
----------------

[](#️-customization)

### Custom installer URL

[](#custom-installer-url)

```
'route_prefix' => 'setup',
```

### Custom redirect after install

[](#custom-redirect-after-install)

```
'redirect_after_install' => '/dashboard',
```

### Custom admin model + role behavior

[](#custom-admin-model--role-behavior)

```
'admin_model' => App\\Models\\Admin::class,
'admin_role_attribute' => 'user_type',
'admin_role_value' => 'super_admin',
```

### Add providers during finalization

[](#add-providers-during-finalization)

```
'providers_to_register' => [
	App\Providers\CustomServiceProvider::class,
],
```

### Add your own installer steps

[](#add-your-own-installer-steps)

#### Quick scaffold with Artisan

[](#quick-scaffold-with-artisan)

Generate a new installer step with Livewire component and view:

```
php artisan make:installer-step
```

The command will ask you for:

1. **Installer step title** — e.g. `Redis Setup`
2. **Installer step description** — e.g. `Configure Redis connection settings.`
3. **Installer step order** — position in the wizard (1–99), defaults to next available
4. **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-a--manual-registration)

```
'steps' => [
		\Zisunal\LaravelInstaller\Livewire\Steps\WelcomeStep::class,
		App\Installer\Steps\LicenseAgreementStep::class,
		\Zisunal\LaravelInstaller\Livewire\Steps\RequirementsStep::class,
		\Zisunal\LaravelInstaller\Livewire\Steps\EnvironmentStep::class,
		\Zisunal\LaravelInstaller\Livewire\Steps\AdminUserStep::class,
		\Zisunal\LaravelInstaller\Livewire\Steps\FinishStep::class,
],
```

#### Option B — auto-discovery

[](#option-b--auto-discovery)

```
'discover' => [
		'enabled' => true,
		'paths' => [
				app_path('Installer/Steps') => 'App\\Installer\\Steps',
		],
],
```

Your step class must extend:

```
Zisunal\LaravelInstaller\Livewire\Steps\AbstractInstallerStep
```

---

🧠 Runtime Behavior
------------------

[](#-runtime-behavior)

On **Finish**, the installer manager will:

1. finalize DB connection config in memory,
2. run migrations (if enabled),
3. run seeders (if enabled),
4. create/update admin user,
5. clear caches,
6. write lock file,
7. write environment/config values,
8. register configured providers,
9. redirect to configured destination.

---

🔐 Security &amp; Behavior
-------------------------

[](#-security--behavior)

- Installer route is blocked when lock file exists.
- Global `installed` middleware 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)
----------------------------------------

[](#-reset--re-run-installer-development)

To run the installer again in a dev environment, remove the lock file:

```
rm -f storage/app/installed.lock
```

If needed, also republish config:

```
php artisan installer:setup --force
```

---

🧷 Route &amp; Middleware Integration
------------------------------------

[](#-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:

```
Route::middleware(['web', 'installed'])->group(function () {
		// protected routes here
});
```

---

🤝 Contributing
--------------

[](#-contributing)

Issues and pull requests are welcome.

If you contribute UI-related improvements, keep the wizard flow minimal, clear, and production-friendly.

---

📄 License
---------

[](#-license)

MIT

###  Health Score

44

—

FairBetter than 91% of packages

Maintenance89

Actively maintained with recent releases

Popularity19

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~5 days

Total

9

Last Release

55d ago

Major Versions

1.0.5 → 2.0.02026-05-03

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/60127208?v=4)[MD Al Fariya Zisun](/maintainers/zisunal)[@zisunal](https://github.com/zisunal)

---

Top Contributors

[![zisunal](https://avatars.githubusercontent.com/u/60127208?v=4)](https://github.com/zisunal "zisunal (16 commits)")

### Embed Badge

![Health badge](/badges/zisunal-laravel-installer/health.svg)

```
[![Health](https://phpackages.com/badges/zisunal-laravel-installer/health.svg)](https://phpackages.com/packages/zisunal-laravel-installer)
```

###  Alternatives

[laravel/ai

The official AI SDK for Laravel.

9782.1M162](/packages/laravel-ai)[laravel/boost

Laravel Boost accelerates AI-assisted development by providing the essential context and structure that AI needs to generate high-quality, Laravel-specific code.

3.5k17.6M515](/packages/laravel-boost)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k14.1M122](/packages/laravel-pulse)[laravel/wayfinder

Generate TypeScript representations of your Laravel actions and routes.

1.7k7.0M117](/packages/laravel-wayfinder)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

76518.2M120](/packages/laravel-mcp)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9742.3M121](/packages/roots-acorn)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
