码迷,mamicode.com
首页 >  
搜索关键字:yii2 restfulapi    ( 1446个结果
Yii2 数据库Active Record(ORM)
ACTIVE RECORD(ORM)参考:http://www.yiiframework.com/doc-2.0/guide-db-active-record.htmlnamespaceapp\models;useyii\db\ActiveRecord;classCustomerextendsAct...
分类:数据库   时间:2015-08-19 10:36:24    阅读次数:525
Yii2.0中文开发向导——删除数据
直接 model 删除$model = User::find($id);$model->delete();带有条件的删除$connection ->createCommand() ->delete('tbl_user', 'status = 0') ->e...
分类:其他好文   时间:2015-08-18 20:58:00    阅读次数:175
Yii 2.0排序功能的使用
在Yii2.0项目的实际开发中,经常会遇到使用Yii2.0自带的排序功能。下面是排序功能的具体使用方法。一、设置排序规则注意引入Sort类,如:use yii\data\Sort; // 设置排序字段 $sortObject = new Sort([ ...
分类:编程语言   时间:2015-08-17 18:43:14    阅读次数:542
Yii2中的规则
array(array(‘username’, ‘required’),array(‘username’, ‘length’, ‘min’=>3, ‘max’=>12),array(‘password’, ‘compare’, ‘compareAttribute’=>’password2′, ‘on...
分类:其他好文   时间:2015-08-17 00:38:32    阅读次数:599
Yii2 搜索
where(['user_id'=>\Yii::$app->user->id])->asArray()->all(),'id','name_zh'), ['class'=>'form-control input-sm','prompt' => '请选择品牌'])?>'form-control inp...
分类:其他好文   时间:2015-08-13 15:41:10    阅读次数:129
Yii2中多表关联查询(with、join、joinwith)
表结构现在有客户表、订单表、图书表、作者表,客户表Customer (idcustomer_name)订单表Order (idorder_name customer_id book_id)图书表Book (idbook_name author_id)作者表Author (i...
分类:其他好文   时间:2015-08-12 23:34:56    阅读次数:831
Yii2.0手册地址
官网打不开,可以看这里 http://yii2.techbrood.com/   ;跟官网里面文档一样。ps:今天真郁闷,官网都打不开...
分类:其他好文   时间:2015-08-12 11:38:59    阅读次数:90
高效中的细节注意
看到yii2.0源码中大量使用 /** * PHP getter magic method. * This method is overridden so that attributes and related objects can be accessed like prop...
分类:其他好文   时间:2015-08-11 15:32:35    阅读次数:102
Yii2.0 集成使用富头像上传编辑器
在开发过程中,我们会用到头像上传的功能。这里给大家推荐一款比较流行的头像上传组件,FullAvatarEditor 2.3(富头像上传编辑器)。实际效果如图所示:1.下载组件,下载地址:http://www.fullavatareditor.com/download.html;2.在所需页面上导入相...
分类:Web程序   时间:2015-08-11 09:50:00    阅读次数:1202
Yii2 form
use yii\widgets\ActiveForm; ['class' => 'form-horizontal'], 'fieldConfig' => [ 'options'=>['class'=>'control-group'], ...
分类:其他好文   时间:2015-08-07 18:56:53    阅读次数:101
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!