rolukja/vilt-crud-generator 问题修复 & 功能扩展

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

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

rolukja/vilt-crud-generator

最新稳定版本:1.0.1

Composer 安装命令:

composer require rolukja/vilt-crud-generator

包简介

A Composer package for automatically generating CRUD files for Laravel with Inertia.js and Vue.

README 文档

README

The VILT CRUD Generator is a Laravel package that automatically generates CRUD structures (controllers, routes, Vue components) for your models. It leverages Inertia.js and Vue, saving you from repetitive tasks by setting up common CRUD functionalities for your application.

Installation

  1. Install the package via Composer:

    composer require rolukja/vilt-crud-generator
  2. (Optional) Publish the configuration file and stubs:

    php artisan vendor:publish --provider="Rolukja\\ViltCrudGenerator\\Providers\\ViltCrudGeneratorServiceProvider"
  3. Install NPM dependencies:

    npm install vue-multiselect --save

Usage

  1. Create a model, for example App\Models\Post.

  2. Run the generator:

    php artisan vilt:generate Post

    The generator will analyze the model (and its database table) to automatically create:

    • A controller (e.g., App\Http\Controllers\PostController)
    • Routes in routes/web.php
    • Vue components (Index, Show, Form) in resources/js/Pages/Post/

Features

  • Automatically reads and uses database schema information (field types, validations).
  • Generates controllers, routes, and Vue files (Form, Index, Show).
  • Supports customizable stubs, allowing you to publish and adapt them to your needs.
  • Compatible with Laravel 11, Inertia.js, and Vue.

Testing

This package uses Pest for testing:

composer test

License

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-02-13