要想属性可搜索,需要在在Model的rules 设定可以搜索的属性public function rules() | public function rules() { return [ [['id', 'date', 'type', 'blocked_time', 'create_ti...
分类:
其他好文 时间:
2015-08-14 21:07:03
阅读次数:
159
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
#user nobody;worker_processes 1; #error_log logs/error.log;#error_log logs/error.log notice;#error_log logs/error.log info; #pid logs/ng...
分类:
移动开发 时间:
2015-08-12 22:58:31
阅读次数:
306
'basic', 'basePath' => dirname(__DIR__), 'bootstrap' => ['log'], 'components' => [ 'request' => [ // !!! insert a secret k...
分类:
移动开发 时间:
2015-08-08 11:58:57
阅读次数:
132
use yii\widgets\ActiveForm; ['class' => 'form-horizontal'], 'fieldConfig' => [ 'options'=>['class'=>'control-group'], ...
分类:
其他好文 时间:
2015-08-07 18:56:53
阅读次数:
101
使用Yii2.0 framework开发的项目,使用Github进行版本控制,现在要把这个项目部署到一个新的电脑/系统中:(1)安装LAMP(2)在/var/www/html目录下执行git clone YOUR_YII_WEB_PROJECT(3)cd Yii2.0 web项目(例如:mabuha...
分类:
Web程序 时间:
2015-08-06 18:09:43
阅读次数:
265
nginx.conf#user nobody;worker_processes 1;#error_log logs/error.log;#error_log logs/error.log notice;#error_log logs/error.log info;#pid ...
分类:
移动开发 时间:
2015-08-06 12:42:14
阅读次数:
205
在Yii的Model里进行查询的时候 where是必不可少的。Where方法声明为static where( $condition )其中参数 $condition类型为字符串或者数组1、字符串字符串是最简单的,直接按sql中的where条件写就可以,如$condition = 'name=\'zh...
分类:
其他好文 时间:
2015-08-06 12:32:58
阅读次数:
117
1、VerbFilter
VerbFilter 是针对 HTTP 请求方式的过滤器,作用是定义访问指定动作所允许的HTTP请求,若不允许的HTTP请求到来,则会抛出一个 HTTP 405 错误。若不指定允许的请求方式,则默认允许当所有类型的请求方式 。
接下来,试一试 VerbFilter 的简单使用。
首先,在 SiteController 中添加代码
public fun...
分类:
Web程序 时间:
2015-08-06 00:35:46
阅读次数:
230
在Yii的Model里进行查询的时候 where是必不可少的。Where方法声明为static where( $condition )其中参数 $condition类型为字符串或者数组1、字符串字符串是最简单的,直接按sql中的where条件写就可以,如$condition = 'name=\'zh...
分类:
其他好文 时间:
2015-08-05 21:52:32
阅读次数:
113