Laravel 简单的自动 CRUD 生成器

v0.3.0 2024-01-08 11:14 UTC

This package is auto-updated.

Last update: 2024-09-08 13:12:43 UTC


README

这是一个简单而高效的 Laravel CRUD 生成器,它可以自动创建控制器、模型、迁移和视图(索引、创建、存储、编辑、更新、删除、显示方法)。它还会将生成的控制器链接到相应的视图。

安装

composer require mdakashmia/laravel-auto-crude

配置

服务提供者注册config/app.php 中,向 providers 数组添加 -

'providers' => [
    // ...
    Akash\LaravelAutoCrude\AutoCrudeServiceProvider::class,
    // ...
],

从控制台命令提示符使用创建 CRUD

//use the command 
php artisan generate:crude {CrudeName}

示例 CRUD

//suppose i want create a crude name of - Category, then run command
php artisan generate:crude Category
//suppose i want create a crude name of - Post, then run command
php artisan generate:crude Post
//suppose i want create a crude name of - Comment, then run command
php artisan generate:crude Comment