zhoupenghui
- zhoupenghui 发布了话题MVC--深入理解YII2
这样呢:
[['uid'], 'unique', 'targetClass' => AutoComplete::class, 'targetAttribute' => ['uid', $this->_branch => 'branch_id'], 'message' => '编号已经存在',]
- zhoupenghui 赞了回答
if(!Yii::$app->user->isGuest){ $this->redirect('http://XXX/user.php'); }
- zhoupenghui 2017-02-08 已签到连续签到1天,获得了5个金钱
你的form表单标签呢,post提交还要严重csrf,你没有验证
- zhoupenghui 回复了 zhoupenghui 的回答
根据ActiveDataProvider中可以知道:
/** * @var QueryInterface the query that is used to fetch data models and [[totalCount]] * if it is not explicitly set. */ public $query;
说明$query数据是model
@qqa4560354 不是有个分页工具么, Pagination
- zhoupenghui 回答了问题 dataProvider分页
根据ActiveDataProvider中可以知道:
/** * @var QueryInterface the query that is used to fetch data models and [[totalCount]] * if it is not explicitly set. */ public $query;
说明$query数据是model
- zhoupenghui 回复了 zhoupenghui 的回答
把短信相关的放到components下,然后其他可以直接调用,就像这样
/** * brand => api path. * @var array */ private $apiBrandsAllowed = [ 'alidayu' => '@common/components/ali/alidayu', ];
@hyq 恩,这个文件就是用来放置那些第三方的,和一些公用的组件,比如腾讯的微信支付接口,阿里的短信接口,二维码相关的东西都可以放置到里面