定制 phfoxer/apigenerate 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

phfoxer/apigenerate

最新稳定版本:2.8.5

Composer 安装命令:

composer require phfoxer/apigenerate

包简介

Easy api generate for the Laravel Framework.

README 文档

README

API Rest generator for Laravel Framework. Create your api resource in seconds using only your database table name or connection name.

Installation

composer require phfoxer/apigenerate

Install the service provider:

// config/app.php
'providers' => [
    ...
    Phfoxer\ApiGenerate\ApiGenerateServiceProvider::class,
    ...
];

Usage

Creating a new resource

To create all API Rest resources run this command (Only postgres and mysql):

php artisan generate:api --con=conection_name

To create a new api resource run this command:

php artisan generate:api --table=table_name --relation=true

You can see result in http://localhost:8000/api/table_name You can find your new resource in app/RestAPI. General is the default

Params

To define route:

php artisan generate:api --table=table_name --route=my-custom-route --relation=true

To define module name:

php artisan generate:api --table=table_name --route=my-custom-route --relation=true

You can find your new resource in app/RestAPI/Exemple.

Postcardware

You are free to use this package as it's MIT-licensed

统计信息

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

GitHub 信息

  • Stars: 40
  • Watchers: 4
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-07-03