codelone/codec-web-installer
Composer 安装命令:
composer require codelone/codec-web-installer
包简介
Codec Web Installer - WordPress-like installer package for Laravel applications
README 文档
README
A WordPress-like installer package for Laravel applications that provides a smooth, multi-step installation process.
Requirements
- PHP: 7.4, 8.0, 8.1, 8.2, 8.3, or 8.4
- Laravel: 8.x, 9.x, 10.x, 11.x, or 12.x
- Extensions: PDO, cURL, OpenSSL, JSON, Mbstring
Features
- Multi-step Installation Process: Guided installation similar to WordPress
- System Requirements Check: Validates PHP version, extensions, and folder permissions
- License Verification: API-based license validation system
- Database Setup: Automated database configuration and SQL import
- Security Features: Installation lock, CSRF protection, and secure API communication
- Wide Compatibility: Supports PHP 7.4 through 8.4 and Laravel 8 through 12
Installation
Install the package via Composer:
composer require your-vendor/laravel-installer
The package will auto-register the service provider in Laravel 5.5+.
Configuration
Publish the configuration file:
php artisan vendor:publish --tag=installer-config
Update your .env file with the API endpoint and product ID:
INSTALLER_LICENSE_API_URL=https://api.yoursite.com/verify-license INSTALLER_PRODUCT_ID=1
Usage
1. Access the Installer
Visit /installer in your browser to start the installation process.
2. Installation Steps
- Welcome Page: Introduction and overview
- System Requirements: Check PHP version, extensions, and permissions
- License Verification: Enter license key and email for validation
- Database Setup: Configure database connection and import data
- Completion: Installation summary and next steps
3. API Endpoint
Your server should provide this API endpoint:
License Verification Endpoint
POST /api/verify-license
Content-Type: application/json
{
"license_key": "DYTIOHVHHABDQVOH",
"product_id": 1
}
Success Response:
{
"success": true,
"message": "License verified successfully",
"product_id": 1,
"license_id": 123,
"product_data": "SQL content for installation",
"product_name": "Test Website",
"product_version": "1.0.0",
"allowed_domains": 3,
"license_status": "active",
"expires_at": "2025-01-12 10:30:00"
}
Error Response:
{
"success": false,
"message": "Invalid license key"
}
Note: The product_data field contains the SQL content that will be imported into the database during installation.
Configuration Options
System Requirements
Customize requirements in config/installer.php:
'requirements' => [ 'php' => '8.2.0', 'extensions' => [ 'PDO', 'cURL', 'OpenSSL', 'BCMath', 'Ctype', 'Fileinfo', 'JSON', 'Mbstring', 'Tokenizer', 'XML', 'ZIP' ], 'folders' => [ 'storage/app/' => '775', 'storage/framework/' => '775', 'storage/logs/' => '775', 'bootstrap/cache/' => '775', ], ],
Customization
Publish views for customization:
php artisan vendor:publish --tag=installer-views
Security
- Installation is locked after completion via a lock file
- Routes are protected by middleware
- All forms include CSRF protection
- Database credentials are validated before use
- API communication uses secure HTTPS
License Lock
After successful installation, a lock file is created at storage/installer.lock. To reinstall:
- Delete the lock file
- Clear browser cache
- Visit
/installeragain
Requirements
- PHP 8.2 or higher
- Laravel 10.0 or higher (supports Laravel 12.x)
- Required PHP extensions (see configuration)
- Writable storage directories
Contributing
Please see CONTRIBUTING.md for details.
Security
If you discover any security related issues, please email security@yourvendor.com instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 30
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-10-13