amdadulshakib/installer
最新稳定版本:v2.1
Composer 安装命令:
composer require amdadulshakib/installer
包简介
Laravel Installer Package
README 文档
README
A clean and easy-to-use Laravel installation wizard with environment setup, database import, admin user creation, and project locking system — perfect for CodeCanyon and distributable Laravel apps.
🚀 Features
- Welcome screen
- System requirements checker
- .env environment setup form
- Database connection test & SQL file import (no migration)
- Admin user creation
- Installed lock file system
- UI-based installation wizard
- Middleware protection for installed state
- Publishable views & assets
📂 Folder Structure Overview
packages/
└── amdadulshakib/
└── Installer/
└── src
├── Controllers/
├── Middleware/
├── routes/
├── resources/
│ └── views/
├── routes/
│ └── web.php
├── helper.php
├── InstallerServiceProvider.php
└── composer.json
🧩 Installation
Option 1: Use from GitHub
Add this to your project's composer.json:
"repositories": [ { "type": "vcs", "url": "https://github.com/amdadulshakib/laravel-project-installer" } ]
Then run:
composer require amdadulshakib/installer
Option 2: Use Locally (For development)
Add this to your composer.json:
"repositories": [ { "type": "path", "url": "packages/amdadulshakib/Installer" } ]
Then install:
composer require amdadulshakib/installer:@dev
⚙️ Publish Assets and Views
php artisan vendor:publish --tag=installer-views php artisan vendor:publish --tag=installer-assets
🛡️ Middleware
This package auto-registers a middleware install.lock that prevents accessing the app before installation.
You can apply globally using:
$this->app['router']->pushMiddlewareToGroup('web', \amdadulshakib\Installer\Middleware\IsNotInstalled::class);
Middleware Logic:
- If
/storage/installed.lockdoes not exist, it redirects to/install - After successful installation, the lock file is created
- Trying to access
/installagain after installation is blocked
🧪 SQL Import Instead of Migrations
The package does not use migrations. Instead, it imports database.sql from:
packages/amdadulshakib/Installer/database/database.sql
Place your pre-built SQL dump file here to set up the database during installation.
✍️ Usage Steps
- Visit
/install - Go through:
- Welcome
- Requirements check
- Environment setup
- Database setup (will import
database.sql) - Admin user creation
- Finish
- After installation, a
storage/installed.lockfile will be created - Any access to
/installafter installation will be blocked
🎨 Styling
To include CSS or JS:
- Place files in
packages/amdadulshakib/Installer/public/ - Publish them using:
php artisan vendor:publish --tag=installer-assets
- Use in views:
<link rel="stylesheet" href="{{ asset('vendor/installer/css/installer.css') }}"> <script src="{{ asset('vendor/installer/js/installer.js') }}"></script>
📦 License
Open-source and customizable for commercial or private Laravel projects.
❤️ Author
Amdadul Shakib
GitHub Profile
统计信息
- 总下载量: 14
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-07-09