codalaya / php-project-install-wizard
Web installer for Laravel products: requirements, permissions, database, optional purchase-code step and admin account. Records the installation in the database and locks itself afterwards.
Package info
github.com/codalaya/php-project-install-wizard
pkg:composer/codalaya/php-project-install-wizard
Requires
- php: >=8.2
- illuminate/database: ^11.0|^12.0|^13.0
- illuminate/support: ^11.0|^12.0|^13.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-10-09 01:23:10 UTC
README
A web installer for Laravel products (CodeCanyon-style "upload and open in the browser" installs).
Steps: Requirements & Permissions → Database → License (optional) → Admin account → Finish.
- Checks the PHP version, extensions and folder permissions
- Writes
.env, generatesAPP_KEY, runs migrations and seeders (or imports a SQL dump) - Optional purchase-code step (plug in your own license check)
- Creates the first admin account through your own handler class
- Records the installation in the database and locks itself: once installed, every installer route returns 404
- Until installed, every web request is redirected to the installer, with file sessions so it works before a database exists
Requires PHP 8.2+ and Laravel 11, 12 or 13.
Installation
composer require codalaya/laravel-installer php artisan vendor:publish --tag=codalaya-installer
The publish step copies config/install.php, the views (resources/views/vendor/installer) and the assets (public/install).
Open your site in the browser and the installer starts at /install-app.
Configuration (config/install.php)
| Key | What it does |
|---|---|
install_title, colors |
Installer heading and colours |
version, table |
Version recorded in the installations table (default app_installations) |
redirect_when_not_installed |
Send every web request to the installer until installed |
redirect_after |
Where Finish lands (e.g. /login) |
database.seed, database.database_path |
Seed after migrating, or import a SQL dump instead |
core.minPhpVersion, requirements, permissions |
What the first step checks |
account, account_fields |
Validation rules and form fields of the admin account step |
account_handler |
Class implementing Codalaya\LaravelInstaller\Contracts\CreatesInstallAccount that creates the admin user |
license_handler |
Optional purchase-code step, see below; null skips it |
Admin account
use Codalaya\LaravelInstaller\Contracts\CreatesInstallAccount; class CreateAdminAccount implements CreatesInstallAccount { public function create(array $data): ?int { $user = \App\Models\User::create([...$data, 'password' => bcrypt($data['password'])]); $user->assignRole('admin'); return $user->id; } }
Only the fields validated by install.account reach create().
License step
Point license_handler at a class with these static methods:
class License { public static function host(): string; // this site's domain public static function isLocal(string $host): bool; // true = the code is optional here public static function activate(string $code): array; // throw ValidationException (key "purchase_code") to refuse }
On a live domain the step can't be skipped. On local and staging hosts the code is optional.
Checking the installation in your app
use Codalaya\LaravelInstaller\Main\InstalledManager; InstalledManager::isInstalled(); // bool InstalledManager::record(); // the installations row (version, installed_at, …) or null
License
MIT. See LICENSE.