定制 amdadulshakib/installer 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

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.lock does not exist, it redirects to /install
  • After successful installation, the lock file is created
  • Trying to access /install again 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

  1. Visit /install
  2. Go through:
    • Welcome
    • Requirements check
    • Environment setup
    • Database setup (will import database.sql)
    • Admin user creation
    • Finish
  3. After installation, a storage/installed.lock file will be created
  4. Any access to /install after installation will be blocked

🎨 Styling

To include CSS or JS:

  1. Place files in packages/amdadulshakib/Installer/public/
  2. Publish them using:
php artisan vendor:publish --tag=installer-assets
  1. 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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-09