承接 ssnukala/sprinkle-crud5 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

ssnukala/sprinkle-crud5

Composer 安装命令:

composer require ssnukala/sprinkle-crud5

包简介

CRUD Module for UserFrosting 5.0.

README 文档

README

Version License UserFrosting

A powerful, schema-driven CRUD (Create, Read, Update, Delete) system for UserFrosting 5.x that allows you to rapidly build complete CRUD interfaces through simple YAML configuration files.

✨ Features

  • 🚀 Rapid Development: Create full CRUD interfaces in minutes with YAML configuration
  • 📋 Schema-Driven: Define tables, columns, validations, and forms using YAML
  • 🎨 Consistent UI: Uniform interface across all CRUD operations using AdminLTE
  • 🔒 Permission-Based: Built-in permission system integrated with UserFrosting
  • 📝 Auto Forms: Automatic form generation with client & server-side validation
  • 📊 Data Tables: Sortable, filterable, paginated tables with Sprunje
  • 🔧 Extensible: Easy to customize controllers, views, and business logic
  • ✅ Type-Safe: Leverages PHP 8+ features with strict typing

📖 Documentation

Complete documentation is available in DOCUMENTATION.md

The documentation includes:

  • Detailed installation instructions
  • Complete architecture overview
  • Configuration guide with examples
  • Usage examples and best practices
  • API reference
  • Advanced topics and customization
  • Troubleshooting guide

🚀 Quick Start

Installation

composer require ssnukala/sprinkle-crud5

Register Sprinkle

// app/src/MyApp.php
use UserFrosting\Sprinkle\CRUD5\CRUD5;

public function getSprinkles(): array
{
    return [
        Core::class,
        Account::class,
        Admin::class,
        AdminLTE::class,
        CRUD5::class,  // Add this
    ];
}

Run Migrations

php bakery migrate
npm install
npm run build

Create Your First CRUD Interface

Create app/schema/crud5/products.yaml:

---
model: products
title: Product Management
description: Manage products inventory
permission: c5_user

table:
  id: table-products
  css-class: crud5-table
  columns:
    name:
      label: "PRODUCT NAME"
      sortable: true
      searchable: true
    price:
      label: "PRICE"
      sortable: true
    actions:
      label: "ACTIONS"
      template: actions

Create request schema app/schema/requests/products/create.yaml:

name:
  validators:
    required:
      message: "Product name is required"
    length:
      max: 255
  form:
    type: text
    label: "Product Name"
    placeholder: "Enter product name"

price:
  validators:
    required:
      message: "Price is required"
    numeric:
      message: "Must be a number"
  form:
    type: number
    label: "Price"
    step: "0.01"

Copy create.yaml to edit-info.yaml, then access: /crud5/products

That's it! You now have a complete CRUD interface with list, create, edit, and delete functionality.

🎯 Key Components

Routes

Pattern Description
/crud5/{slug} List view page
/api/crud5/{slug} API endpoints (GET, POST, PUT, DELETE)
/modals/crud5/{slug}/create Create modal form
/modals/crud5/{slug}/edit Edit modal form

Controllers

  • BasePageListAction - List views with Sprunje
  • BaseCreateAction - Create records
  • BaseEditAction - Update records
  • BaseDeleteAction - Delete records
  • BaseEditModal - Form modals

Configuration Files

  • app/schema/crud5/{table}.yaml - Table configuration
  • app/schema/requests/{table}/create.yaml - Create form schema
  • app/schema/requests/{table}/edit-info.yaml - Edit form schema

💡 Example Use Cases

  • User management systems
  • Product catalogs
  • Content management
  • Inventory tracking
  • Any database table CRUD operations

🛠️ Requirements

  • PHP ≥ 8.0
  • UserFrosting ≥ 5.0
  • FormGenerator ~5.1.0
  • AdminLTE Theme ≥ 5.0

📚 Features In Detail

Dynamic CRUD Operations

Complete Create, Read, Update, Delete operations for any table through configuration alone.

Schema-Driven Configuration

Define everything in YAML: columns, validation rules, form fields, permissions, display templates.

Permission System

Built-in permissions (c5_user, c5_admin) with support for custom permissions.

Form Generation

Automatic forms with validation using FormGenerator library.

Data Tables

Sortable, searchable, paginated tables using Sprunje.

Middleware Injection

Automatic model loading and injection based on routes.

Extensibility

Easy to extend with custom controllers, validators, templates, and business logic.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📝 License

This project is licensed under the MIT License - see the LICENSE.md file for details.

👤 Author

Srinivas Nukala

🙏 Acknowledgments

Built with:

📖 Further Reading

Note: For complete installation instructions, configuration options, API reference, and advanced usage, please refer to DOCUMENTATION.md.

ssnukala/sprinkle-crud5 适用场景与选型建议

ssnukala/sprinkle-crud5 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 17 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 12 月 23 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

围绕 ssnukala/sprinkle-crud5 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-12-23