abhishekdixit0407/laravel-autocrud
最新稳定版本:v1.0.0
Composer 安装命令:
composer require abhishekdixit0407/laravel-autocrud
包简介
A package to create automatic crud api for a specific resource
README 文档
README
Laravel AutoCrud is a handy package that helps you quickly create CRUD API(Create, Read, Update, Delete) API endpoints for your Laravel applications. With just a single Artisan command, you can generate all the necessary files to manage your resources effortlessly.
Installation
- You can install Laravel AutoCrud via Composer:
composer require abhishekdixit0407/laravel-autocrud
- After installation, To generate CRUD API endpoints for a resource, use the following command:
php artisan autocrud:api ResourceName --columns="name:string,email:string,data:json"
-
Replace ResourceName with the name of your unique resource(Example:User,Post,Medicine....etc). Use the --columns option to specify the columns of your database with its type (their is no limaitation to add column)
-
Modify migration file according to your need and run:
php artisan migrate
- Now your Laravel app have below routes registered with soft delete. To see routes:
| Method | Route | Route Name | Operation | description |
|---|---|---|---|---|
| Get | api/users | users_index | Index | You can also filter |
| the results, e.g: | ||||
| /users?name=abhi | ||||
| Get | api/users/{id} | users_view | View | |
| Post | api/users | users_create | Create | |
| Put | api/users/{id} | users_update | Update | |
| Delete | api/users/{id} | users_delete | Delete |
统计信息
- 总下载量: 29
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-06-01