定制 rafaelnuansa/rncrud 二次开发

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

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

rafaelnuansa/rncrud

Composer 安装命令:

composer require rafaelnuansa/rncrud

包简介

A powerful Artisan command to generate flexible Laravel CRUD scaffolding

README 文档

README

Latest Version on Packagist Total Downloads License

RNCrud is a professional Laravel package designed to accelerate development by generating smart, interactive, and flexible CRUD boilerplates. It is perfect for building both APIs and Blade-based applications.

✨ Features (v1.1.2)

  • 🛠️ Interactive Field Builder (New!) Forget manual typing. If you skip the --fields flag, the package will guide you step-by-step to define your columns and data types.
  • 🤖 Modern Interactive UI Uses Laravel Prompts for a sleek terminal experience. Navigate with arrow keys and toggle selections with the spacebar.
  • 🌐 API & Web Support Choose between a standard Controller (Blade) or an API Controller (JSON response).
  • 📂 Multi-Namespace Support Create files inside sub-folders (e.g., Admin/Product).
  • 🔗 Smart ORM Relations Automatically detects foreign keys (ending with _id) to generate belongsTo relationships in Models and constrained() in Migrations.
  • 🗑️ Soft Deletes Support Easily add SoftDeletes trait to Models and softDeletes() column to migrations with a single flag (-s).
  • 🎨 Blade Generation Generates Blade files (index, create, edit, show) with clean and modern structures.

📋 Requirements

  • PHP: ^8.1 - ^8.5
  • Laravel: ^10.0 | ^11.0 | ^12.0 | ^13.0

📦 Installation

Install via Composer:

composer require rafaelnuansa/rncrud

🚀 Usage

1. The Easy Way (Fully Interactive)

Simply run the command and follow the prompts:

php artisan make:crud ModelName

2. The Pro Way (Using Flags)

Run everything in one line:

php artisan make:crud ModelName --fields="column_name:type"

Pro Examples

1. Standard CRUD with Soft Deletes:

php artisan make:crud Post --fields="title:string,body:text" --soft-delete

2. Admin CRUD with Relations (Using Shortcuts):

php artisan make:crud Admin/Product -s --fields="category_id:foreign,name:string,price:integer"

3. Generate only Model and Controller (No Migration):

php artisan make:crud Task -m

🕹 Interactive Mode Guide

  • Arrow Keys: Navigate between options.
  • Spacebar: Toggle file selections (Model, Controller, etc.).
  • Enter: Confirm selection or go to the next step.
  • Field Builder: Type your field name, select the type from the list, and confirm to add more.

🛠 Command Options

Option Shortcut Description
--fields Define database columns (Format: name:type,name2:type).
--soft-delete -s Adds SoftDeletes trait to Model and column to Migration.
--no-migration -m Skips generating the migration file.
--force Overwrite existing files without warning.
--help Display detailed usage instructions and examples.

🧩 Customizing Templates (Stubs)

If you want to customize the generated code (e.g., changing the UI to Bootstrap or modifying the Controller logic), publish the stubs:

php artisan vendor:publish --tag=rncrud-stubs

The files will be available in stubs/vendor/rncrud/.

📁 Output Structure

  • Model: app/Models/Product.php
  • Controller: app/Http/Controllers/Admin/ProductController.php
  • Migration: database/migrations/YYYY_MM_DD_create_products_table.php
  • Views: resources/views/products/*.blade.php
  • Route: Automatically registered in web.php or api.php

📄 License

This package is open-sourced under the MIT License.

👨‍💻 Author

Developed by Rafael Nuansa.

rafaelnuansa/rncrud 适用场景与选型建议

rafaelnuansa/rncrud 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 16 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 03 月 27 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 rafaelnuansa/rncrud 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-27