sakshi-chavan/laravel-crud-generator 问题修复 & 功能扩展

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

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

sakshi-chavan/laravel-crud-generator

最新稳定版本:v1.0.3

Composer 安装命令:

composer require sakshi-chavan/laravel-crud-generator

包简介

A reusable Laravel package to generate CRUD from a JSON template

README 文档

README

A simple and customizable Laravel package to generate CRUD operations from a JSON template.

🛠️ Installation

Step 1: Require the package

Run:

composer require sakshi-chavan/laravel-crud-generator

Step 2: Generate CRUD template

Run:

php artisan make:crud-template {jsonFileName}

Step 3: Edit the generated template

E.g Post.json template

{
    "model": "Post",
    "fields": [
        {
            "name": "title",
            "type": "string",
            "nullable":false
        },
        {
            "name": "content",
            "type": "text",
            "nullable": false
        },
        {
            "name": "user_id",
            "type": "integer",
            "nullable": false
        },
        {
            "name": "owner_id",
            "type": "integer",
            "nullable": false
        },

        {
            "name": "is_restricted",
            "type": "boolean",
            "nullable": false,
            "default": 1
        }
    ]
}

Step 4: Generate CRUD Command

Run:

php artisan generate:crud {jsonFileName}

🧩 What It Does

This package allows you to automatically generate full CRUD functionality in Laravel using a single JSON template.

Currently Supports:

  • ✅ Model generation
  • ✅ Migration generation
  • ✅ Form Request classes
  • ✅ Route entries
  • ✅ Controller with CRUD logic
  • ✅ Resource generation
  • ✅ Factory generation
  • ✅ Basic Crud Test cases generation(PEST)

⚠️ Note: All files and respective code are generated based on stub templates.

Imports for related models (like relationships) may not always be accurate.
Please review and adjust them after generation.

统计信息

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

GitHub 信息

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

其他信息

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