super-admin-org/helpers 问题修复 & 功能扩展

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

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

super-admin-org/helpers

Composer 安装命令:

composer require super-admin-org/helpers

包简介

Helpers extension for super-admin

README 文档

README

Laravel Scaffolding System (Super-Admin Extension)

A developer productivity extension for Super-Admin that automates CRUD generation for Laravel applications.
From a simple web interface, you can generate Models, Controllers, Views, Migrations, Routes, and Pest tests instantly.

Overview

This extension eliminates repetitive boilerplate coding by providing a form-based interface to create Laravel CRUD modules.
It supports generating:

  • Eloquent Models
  • Migrations
  • Controllers (Admin, Web, API)
  • Blade Views
  • Routes (Admin, Web, API)
  • Pest Unit & Feature Tests

All generated code follows a consistent and maintainable structure.

Workflow

flowchart TD
  A[Open Scaffold Form] --> B[Fill Details: Model, Controller, Fields]
  B --> C[Submit to ScaffoldController@store]
  C --> D[Validate & Save to Database]
  D --> E[Generate Laravel Resources]
  E --> F[Insert Routes: Admin, Web, API]
  F --> G[Add Menu Entry (optional)]
  G --> H[Manage from Dashboard]

Key Features

1. Automatic Resource Generation

  • Models
  • Controllers (Admin, Web, API)
  • Migrations
  • Blade Views
  • Routes (Admin, Web, API)
  • Pest Test Stubs (Unit + Feature)

2. Intelligent File Handling

  • Backup before overwriting
  • Remove generated files on scaffold deletion

3. Admin Menu Integration

  • Optionally add an admin panel menu entry

4. Standardized API Responses

  • Includes ResponseMapper trait for consistent JSON output

5. Safe & Reliable

  • Rollbacks on failure
  • Logs all important actions

Features

  • Automatic Resource Generation: Generate models, controllers (admin, web, API), migrations, Blade views, routes (admin, web, API), and test cases in Pest.
  • Intelligent File Handling: Backup existing files before overwriting and remove unused scaffold files on deletion.
  • Admin Menu Integration: Automatically adds a menu link to the admin panel.
  • API Response Standardization: Includes ResponseMapper trait for consistent JSON formatting.
  • Error Handling: Rolls back partial files on failure and logs all important actions.

Usage

  1. Open the Scaffold Form – Go to /scaffold/create in your browser.
  2. Fill in Details – Model name, table name, controller name, view path, and add multiple fields with type, name, and label.
  3. Submit – Backend validates data and generates resources instantly.
  4. Manage from Dashboard – View, download, or delete scaffolds from /scaffold/list.

Advantages

  • ** Time Saver** – Generate full CRUD in seconds.
  • ** Consistency** – Standardized Laravel code structure.
  • ** Safety** – Backup before overwrite.
  • ** Extensible** – Add more generation rules easily.

Why This Plugin?

  • Ship faster – Go from schema to Admin + API + Blade in minutes.
  • Stay consistent – Shared conventions reduce “decision tax.”
  • Safer refactors – Included tests catch regressions early.
  • Team-friendly – Great onboarding and shared patterns.

Prerequisites

Before starting, make sure you have:

  • Laravel project with super-admin installed.
  • PHP 8.1+
  • Composer
  • Node.js & npm (for asset compilation)
  • Database configured (MySQL, PostgreSQL, Oracle, or SQL Server supported).

Installing the Scaffolding Extension

Open your terminal in the Laravel project root and run:

composer require super-admin-org/helpers

This installs the Helpers package, which includes the Scaffolding System.

Enabling the Extension

Once installed

Then publish the assets and configuration:

php artisan vendor:publish --tag=super-admin-helpers

This command will:

  • Publish Blade views for scaffold management.
  • Publish migration files for scaffold storage.
  • Add default configuration files.

Running the Migrations

The Scaffolding System stores metadata about each generated CRUD in a dedicated table.

Run:

php artisan migrate

This creates the scaffolds and related tables.

To generate seed data from existing tables, run:

php artisan scaffold:generate-seeders

if you want to remove Remove prefix from table name to generate seed

php artisan scaffold:generate-seeders --remove-prefix=prefix_to_remove

Usage

  1. Open the Scaffold Form
    Navigate to /scaffold/create.

  2. Fill in Details

    • Model Name
    • Table Name
    • Controller Name
    • View Path
    • Field Definitions (type, name, label, etc.)
  3. Generate Resources
    On submission:

    • Files are generated
    • Routes are registered
    • Optional menu link is added
  4. Manage from Dashboard
    View, download, or delete scaffolds from /scaffold/list.

Benefits

  • ** Save Time** – Full CRUD in seconds
  • ** Consistent** – Unified Laravel code patterns
  • ** Safe** – Backups prevent accidental loss
  • ** Extensible** – Easily add new generation rules

Example Generated Structure

app/
├─ Admin/Controllers/StudentInfoController.php
├─ Http/Controllers/Api/StudentInfoApiController.php
├─ Http/Controllers/Web/StudentInfoController.php
├─ Models/StudentInfo.php
database/migrations/
├─ 2025_..._create_student_info_table.php
resources/views/student_infos/
├─ index.blade.php
├─ create.blade.php
├─ edit.blade.php
├─ _form.blade.php
routes/
├─ api.php
├─ web.php
tests/
├─ Pest.php
├─ Unit/Models/StudentInfoTest.php
├─ Feature/API/StudentInfoApiTest.php
├─ Feature/Web/StudentInfoWebTest.php
├─ Feature/Admin/StudentInfoAdminTest.php

Pest Testing

Generated Pest test stubs include:

  • Unit Tests – Model configuration, traits, and fillables
  • Feature Tests – CRUD for Admin, Web, and API endpoints

Run tests:

./vendor/bin/pest

🛠 Developer Notes

  • Backup Location: storage/scaffold_backups
  • Generated Routes:
    • Admin: routes/admin.php
    • Web: routes/web.php
    • API: routes/api.php
  • Trait Location: app/Traits/ResponseMapper.php

Contributing

We welcome contributions! You can help with:

  • Writing & improving tests
  • Suggesting new generation features
  • Translating documentation
  • Sponsoring development

License

Licensed under the MIT License.

Credits

super-admin-org/helpers 适用场景与选型建议

super-admin-org/helpers 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.4k 次下载、GitHub Stars 达 4, 最近一次更新时间为 2025 年 08 月 11 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「helpers」 「super-admin」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 super-admin-org/helpers 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 super-admin-org/helpers 我们能提供哪些服务?
定制开发 / 二次开发

基于 super-admin-org/helpers 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-08-11