usermp/laravel-generator 问题修复 & 功能扩展

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

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

usermp/laravel-generator

Composer 安装命令:

composer require usermp/laravel-generator

包简介

asdasdasdasd qwedsadf

README 文档

README

A Laravel package to generate CRUD operations quickly and easily using a YAML configuration file.

Installation

You can install the package via Composer:

composer require usermp/laravel-generator:dev-master

Configuration

Add the LaravelGeneratorServiceProvider class to the providers array in your config/app.php file:

'providers' => [
	Usermp\LaravelGenerator\LaravelGeneratorServiceProvider::class,
],

Usage

To generate a CRUD operation for a specific service, create a YAML configuration file and use the generate:crud Artisan command.

Example YAML Configuration

Below is an example YAML configuration file for generating a CRUD for an Post service:

service:
    name: Post
    fields:
        title: ["string", "required", "max:255"]
        slug: ["string", "required", "max:255"]
        description: ["text", "nullable"]
        author_id: ["integer", "User#id"]
    traits: [
      Illuminate\Notifications\Notifiable,
      Illuminate\Database\Eloquent\SoftDeletes
    ]

Generating CRUD

Once you have your YAML configuration file ready, run the following command to generate the CRUD operations:

php artisan generate:crud path/to/your-config-file.yaml

Replace path/to/your-config-file.yaml with the actual path to your YAML configuration file.

Features

  • Generates migration files based on the YAML configuration.
  • Creates Eloquent models with specified traits and fields.
  • Generates controllers with standard CRUD methods.
  • Creates form requests for validation rules.

License

This package is open-sourced software licensed under the MIT license.

Contact

For any inquiries or support, please reach out to usermp76@gmail.com.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-06-08