Coder Social home page Coder Social logo

yii-restful's Introduction

开启gii,yii的restful接口是根据 gii为基础的model类写的,用gii生成一个model 在web/index.php设置Yii_ENV_DEV 远程的话在gii的配置config/web.php 设置allowIPs;

生成model类后建一个controller继承Yii/rest/activeController 设置一个公共属性$modelClass 值为model的命名空间+model名字

完成之后用 域名/+控制器名/+主键可获取信息

代码是配置和控制器代码

加了一些rabc权限控制的例子,主要是rule的运用进行增删改查和增删改查时人的限定

加入了一个command里面用swoole的消息队列的例子

yii-restful's People

Contributors

yincongcyincong avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.