jmrashed/laravel-installer 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jmrashed/laravel-installer

最新稳定版本:v2.0.7

Composer 安装命令:

composer require jmrashed/laravel-installer

包简介

A complete web installer for Laravel applications, making the setup process simple and user-friendly.

README 文档

README

Latest Stable Version Total Downloads Monthly Downloads License Stars Forks

Laravel Installer v2.0.0 is a complete enterprise-grade package designed to simplify and secure the installation process for Laravel projects. This installer features advanced security, performance monitoring, database backup/recovery, and a comprehensive 9-step installation process.

🚀 What's New in v2.0.0

Complete 9-Step Installation Process

  1. Welcome Screen - Introduction and overview
  2. Server Requirements - PHP version and extension checks
  3. File Permissions - Directory permission validation
  4. Dependencies Check - Composer dependency validation (NEW)
  5. Environment Setup - .env file configuration
  6. Database Configuration - Database connection setup
  7. Database Backup & Migration - Automated backup and migration (NEW)
  8. Cache & Queue Setup - Performance optimization (NEW)
  9. Performance Dashboard - Real-time monitoring (NEW)

🛡️ Enhanced Security Features

  • XSS Protection - Input sanitization and validation
  • Rate Limiting - IP-based request throttling (20 req/5min)
  • Security Headers - CSP, Frame Options, XSS Protection
  • Audit Logging - Comprehensive security event logging
  • Suspicious Content Detection - Automatic threat detection

Performance Monitoring

  • Real-time Metrics - Execution time, memory usage tracking
  • Performance Dashboard - Interactive charts and graphs
  • Database Optimization - Query optimization for large datasets
  • Cache Management - Automated cache clearing and optimization
  • Memory Optimization - Garbage collection and memory management

🔄 Resumable Installation

  • Progress Tracking - Visual progress indicators
  • State Persistence - Resume interrupted installations
  • Step Validation - Prevent skipping required steps
  • Error Recovery - Automatic rollback on failures

💾 Database Backup & Recovery

  • Pre-migration Backup - Automatic database backup
  • Multi-database Support - MySQL, PostgreSQL, SQLite
  • Rollback Capability - Restore on migration failures
  • Batch Processing - Handle large database migrations

📊 Statistics

  • Total Downloads: Total Downloads
  • Monthly Downloads: Monthly Downloads
  • GitHub Stars: Stars
  • GitHub Forks: Forks

🌟 Features

Core Features

  • System Requirements Check - PHP version and extension validation
  • Environment File Setup - Interactive .env configuration
  • Database Configuration - Multi-database support with testing
  • Purchase Code Validation - Envato marketplace integration
  • User-Friendly Interface - Modern responsive design

v2.0.0 New Features

  • Dependency Management - Composer package validation and installation
  • Performance Monitoring - Real-time metrics and optimization
  • Security Enhancements - XSS protection, rate limiting, audit logging
  • Database Backup/Recovery - Automated backup with rollback capability
  • Cache & Queue Setup - Redis, database, sync queue configuration
  • Progress Tracking - Resumable installation with state persistence
  • Multi-language Support - 18+ languages supported
  • API Endpoints - RESTful APIs for all installation operations

🛠️ Installation

Step 1: Install Package

composer require jmrashed/laravel-installer

Step 2: Publish Configuration

php artisan vendor:publish --provider="Jmrashed\LaravelInstaller\Providers\LaravelInstallerServiceProvider"
php artisan vendor:publish --tag=installer-config

Step 3: Publish Assets (Optional)

php artisan vendor:publish --tag=laravelinstaller --force

🚀 How to Use

Web Interface

Navigate to /install in your browser to start the installation wizard.

Command Line

php artisan installer:run

Clear Installer Caches

php artisan installer:clear-caches

Demo Screenshots

Purchase Validation

Server Requirements

Permissions

Dependencies

Environment

Database

Migration

Cache & Queue

Performance

Finished

🔧 API Endpoints

Progress Tracking

  • GET /install/api/progress - Get installation progress
  • POST /install/api/progress/update - Update progress step

Dependencies

  • GET /install/api/dependencies/check - Check dependencies
  • POST /install/api/dependencies/install - Install packages

Performance

  • GET /install/api/performance/metrics - Get real-time metrics
  • POST /install/api/performance/optimize - Optimize performance

Database

  • POST /install/api/database/migrate - Run migrations with backup
  • POST /install/api/database/rollback - Rollback to backup

Cache & Queue

  • POST /install/api/cache/clear - Clear all caches
  • POST /install/api/queue/setup - Configure queue drivers

🛡️ Security Features

Input Validation

// All inputs are sanitized and validated
$sanitizedInput = SecurityHelper::sanitizeInput($request->input());

Rate Limiting

// IP-based rate limiting (20 requests per 5 minutes)
RateLimiter::attempt('installer:' . $request->ip(), 20, 300);

Security Headers

  • X-Content-Type-Options: nosniff
  • X-Frame-Options: DENY
  • X-XSS-Protection: 1; mode=block
  • Content-Security-Policy: default-src 'self'

Performance Features

Real-time Monitoring

// Performance metrics are tracked automatically
fetch('/install/api/performance/metrics')
  .then(response => response.json())
  .then(data => {
    console.log('Execution Time:', data.execution_time);
    console.log('Memory Usage:', data.memory_used);
  });

Database Optimization

// Large database handling
DatabaseOptimizer::optimizeForLargeDatabase();
DatabaseOptimizer::runMigrationsInBatches(10);

💾 Database Backup

Automatic Backup

// Backup is created automatically before migrations
$backupId = DatabaseBackupManager::createBackup();

Manual Rollback

// Rollback to previous state
DatabaseBackupManager::restoreBackup($backupId);

🔄 Progress Tracking

Check Progress

$progress = ProgressTracker::getProgress();
echo "Current Step: " . $progress['current_step'];
echo "Completion: " . $progress['completion_percentage'] . "%";

Resume Installation

if (ProgressTracker::canResume('database')) {
    // Continue from database step
}

🌐 Envato Integration

API Configuration

// Update API endpoints in PurchaseController
$envatoApiTokenUrl = 'https://your-domain.com/api/get-envato-barrier-token';
$envatoApiStoreUrl = 'https://your-domain.com/api/store-envato-verification-response';

Sample API Response

{
  "message": "Welcome to the Envato Purchase Validation API",
  "account1": {
    "token": "fsHuTBwXZTlEqZYQacniBeNZFCrT01eZ"
  },
  "validation": {
    "url": "https://api.envato.com/v3/market/author/sale"
  }
}

📂 v2.0.0 Directory Structure

src/
├── Commands/
│   ├── ClearInstallerCaches.php
│   └── InstallerRunCommand.php
├── Config/
│   ├── installer.php
│   ├── audit.php
│   └── logging.php
├── Controllers/
│   ├── CacheQueueController.php      # NEW
│   ├── DatabaseController.php        # ENHANCED
│   ├── DependencyController.php      # NEW
│   ├── PerformanceController.php     # NEW
│   ├── ProgressController.php        # NEW
│   └── [existing controllers...]
├── Helpers/
│   ├── BackupManager.php            # NEW
│   ├── CacheQueueManager.php        # NEW
│   ├── DatabaseBackupManager.php    # NEW
│   ├── DependencyChecker.php        # NEW
│   ├── PerformanceMonitor.php       # NEW
│   ├── ProgressTracker.php          # NEW
│   ├── SecurityHelper.php           # NEW
│   └── [existing helpers...]
├── Middleware/
│   ├── SecurityMiddleware.php       # NEW
│   ├── PerformanceMiddleware.php    # NEW
│   ├── ProgressMiddleware.php       # NEW
│   ├── DependencyMiddleware.php     # NEW
│   └── [existing middleware...]
├── Views/
│   ├── dependencies.blade.php       # NEW
│   ├── performance-dashboard.blade.php # NEW
│   ├── cache-queue.blade.php        # NEW
│   ├── database-backup.blade.php    # NEW
│   ├── resume-installation.blade.php # NEW
│   └── [existing views...]
└── Routes/
    ├── web.php                      # ENHANCED
    └── backup.php                   # NEW

🔧 System Requirements

Minimum Requirements

  • PHP: 8.0 or higher
  • Laravel: 9.0 or higher
  • Memory: 128MB minimum, 512MB recommended
  • Disk Space: 50MB for package files

Required PHP Extensions

  • mbstring - String manipulation
  • openssl - Encryption and security
  • pdo - Database connectivity
  • tokenizer - Code parsing
  • xml - XML processing
  • ctype - Character type checking
  • json - JSON processing
  • curl - HTTP requests (for Envato API)

Optional Extensions

  • redis - For Redis queue/cache support
  • opcache - For performance optimization
  • zip - For backup compression

🚀 Release Information

Version: v2.0.0

Release Date: December 19, 2024

Status: Production Ready

Breaking Changes: Yes (major version upgrade)

Migration from v1.x

# Backup your current installation
cp -r vendor/jmrashed/laravel-installer vendor/jmrashed/laravel-installer-backup

# Update to v2.0.0
composer update jmrashed/laravel-installer

# Republish configuration
php artisan vendor:publish --tag=installer-config --force

🤝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit changes: git commit -m 'Add amazing feature'
  4. Push to branch: git push origin feature/amazing-feature
  5. Open a Pull Request

📝 License

This package is licensed under the MIT License.

📬 Support

Author

Md Rasheduzzaman
Full-Stack Software Engineer & Technical Project Manager

Building scalable, secure & AI-powered SaaS platforms across ERP, HRMS, CRM, LMS, and E-commerce domains.
Over 10 years of experience leading full-stack teams, cloud infrastructure, and enterprise-grade software delivery.

🌐 Portfolio: jmrashed.github.io
✉️ Email: jmrashed@gmail.com
💼 LinkedIn: linkedin.com/in/jmrashed
📝 Blog: medium.com/@jmrashed
💻 GitHub: github.com/jmrashed

“Need a Reliable Software Partner? I build scalable, secure & modern solutions for startups and enterprises.”

统计信息

  • 总下载量: 74
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 7
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 7
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-10-18