pingu1/yii2-minimal-api 问题修复 & 功能扩展

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

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

pingu1/yii2-minimal-api

Composer 安装命令:

composer create-project pingu1/yii2-minimal-api

包简介

Yii 2 Minimal API template

README 文档

README

This repo is a purified empty application to build Restful APIs based on Yii2 framework. You can find a lot of documentation related to this framework, and the best place to start is maybe their official documentation. This repo contains the minimal structure for an API application with the appropriate configuration already written and working. Without any database, you can still use the HelloController to get some dummy Hello World message.

Installation

  1. Download composer: curl -s https://getcomposer.org/installer | php
  2. Create a new project based on this one composer.phar create-project pingu1/yii2-minimal-api api
  3. Init the Git repository in your new project git init

Setting up your web server

The default setup to server Yii2 projects are also valid for this application. Please read the documentation to setup your Apache or Nginx server.

Code structure

The code is structured as such:

api
-- commands
-- common
---- controllers
---- models
-- config
-- modules
---- v1
------ controllers
------ models
-- runtime
-- tests
-- web
vendor
  • The api directory is basically the root of your application
  • The commands folder contains all the console scripts
  • The common directory contains all models and controllers that could be shared between different versions of your api
  • The modules directory will contain the different versions of your api
  • The runtime directory will stores cache and log files generated during runtime
  • The tests directory will contain all your test files (Yii2 runs with Codeception)
  • The web directory only contains the entry script of your api

Simple Hello World

Once your webserver up and ready, you should be able to access the following urls:

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-06-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固