byfallcode/byfall-crud 问题修复 & 功能扩展

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

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

byfallcode/byfall-crud

Composer 安装命令:

composer require byfallcode/byfall-crud

包简介

Laravel API CRUD generator (models, repositories, requests, controllers, resources, factories, seeders, Postman collections)

README 文档

README

Byfall CRUD is a Laravel package that generates a complete REST API CRUD from your database schema or migrations.

It helps you rapidly scaffold:

  • Models
  • Repositories
  • Form Requests (Store / Update)
  • Controllers (API only)
  • API Resources & Collections
  • Factories
  • Seeders
  • Postman API collections (JSON)

Designed for Laravel 10, 11, 12+ and PHP 8.1+

✨ Features

  • 🚀 Generate full API CRUD in one command
  • 🧠 Infer fields, validation rules, casts and relations
  • 🗄️ Source from database or migration files
  • 🧪 Ready-to-use FormRequests (store & update)
  • 🧱 Repository pattern
  • 📦 API Resources & Collections
  • 🌱 Factories and Seeders
  • 📬 Postman collection generation
  • 🧹 Safe deletion of generated files
  • 🔮 Forward-compatible with future Laravel versions

📋 Requirements

  • PHP >= 8.1
  • Laravel >= 10

📦 Installation

composer require byfallcode/byfall-crud

Laravel automatically discovers the service provider.

🚀 Available Artisan Commands

make:entity – Generate a complete API CRUD

delete:entity – Remove generated files

make:api-collection – Generate Postman collections

🚀Arguments

Argument Description name Entity name in StudlyCase (e.g. Post, Category, UserProfile) Options Option Description

  • --source=db Infer entity from the database schema (default)
  • --source=migration Infer entity from a migration file
  • --table= Database table name (only when --source=db)
  • --migration= Path to the migration file (required with --source=migration)
  • --no-resources Skip API Resources & Collections
  • --no-factory Skip Factory generation
  • --no-seeder Skip Seeder generation
  • --no-collection-json Skip Postman collection generation
  • --force Overwrite existing files without confirmation

Examples

1️⃣ Generate an entity from the database (default)

php artisan make:entity Category --source=db

  • Uses table categories by default

  • Automatically infers:

    • columns

    • nullable / required fields

    • unique constraints

    • foreign keys (belongsTo)

    • validation rules

    • casts

    • soft deletes

2️⃣ Generate an entity from the database with a custom table name

php artisan make:entity Category --source=db --table=product_categories

3️⃣ Generate an entity from a migration file

php artisan make:entity Category --source=migration --migration="database/migrations/2026_01_04_210315_create_categories_table.php"

Useful when:

  • the database is not migrated yet

  • you want to scaffold before deployment

4️⃣ Generate an entity without optional components

php artisan make:entity Category \ --no-resources \ --no-factory \ --no-seeder \ --no-collection-json

5️⃣ Force regeneration of an entity

php artisan make:entity Category --force

⚠️ This will overwrite all previously generated files.

API Route (manual step)

After generating an entity, register the API route manually:

use App\Http\Controllers\CategoryController; Route::apiResource('categories', CategoryController::class);

🧹 delete:entity — Usage

Remove all files generated by make:entity.

php artisan delete:entity Category

With confirmation for each file.

Force deletion (no confirmation):

php artisan delete:entity Category --force

This command removes:

  • Model

  • Repository

  • Controller

  • Form Requests

  • API Resources & Collections

  • Factory

  • Seeder

  • Postman collection

📬 make:api-collection — Usage

Generate a Postman collection for API resources.

From database (default)

php artisan make:api-collection

From migrations

php artisan make:api-collection --source=migrations

byfallcode/byfall-crud 适用场景与选型建议

byfallcode/byfall-crud 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 17 次下载、GitHub Stars 达 4, 最近一次更新时间为 2026 年 01 月 05 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 byfallcode/byfall-crud 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-05