rodrixcornell/apigenerate 问题修复 & 功能扩展

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

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

rodrixcornell/apigenerate

Composer 安装命令:

composer require rodrixcornell/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

  "require-dev": {
    ...
    "rodrixcornell/apigenerate": "dev-master",
    ...
  },
  "repositories": [{
    "type": "vcs",
    "url": "https://github.com/rodrixcornell/laravel-api-generate.git"
  }],
composer update
composer require rodrixcornell/apigenerate --dev

Install the service provider:

// app/Providers/AppServiceProvider.php
public function register()
{
	if ($this->app->environment() !== 'production') {
		$this->app->register(\Rodrixcornell\ApiGenerate\ApiGenerateServiceProvider::class);
	}
}

Usage

Creating a new resource

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

php artisan api:generate --con=conection_name

To create a new api resource run this command:

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

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

Params

To define route:

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

To define module name:

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

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

Postcardware

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

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 0
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-08-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固