然
- 然 2015-06-09 已签到连续签到1天,获得了5个金钱
- 然 回答了问题 我有些字段是默认取值的,不需要填写表单
function rules() { return [ ['id', 'default', 'value' => null], ]; }
- 然 2015-06-05 已签到连续签到1天,获得了5个金钱
class Editor extends InputWidget { public function run() { EditorAsset::register($this->getView()); $this->getView()->registerJs(/*实例化编辑器代码*/); } }
// 编辑器资源文件 class EditorAsset extends AssetBundle { }
至于你的文件如何放这个需要看的目录架构,没办法给你解答。
EditorAsset
和Editor
还有还有资源文件是在同一个目录的。
editor
- assets
- EditorAsset.php
- Editor.php大概的目录结构是这样子的。
使用方法如下
$form->field($model, 'content')->widget(Editor::className(), $config);
- 然 回答了问题 生成CURL中的时间戳转为时间
有个的方法
created_dt时间
但是这样子会根据本地化时间格式化。 使用它
TimestampBehavior
能帮助到你use yii\db\Expression; public function behaviors() { return [ [ 'class' => TimestampBehavior::className(), 'createdAtAttribute' => 'create_time',// 自己根据数据库字段修改 'updatedAtAttribute' => 'update_time', // 自己根据数据库字段修改 'value' => time(), // 自己根据数据库字段修改 ], ]; }
都说是子项目了,那么就需要开启多个Application至于登录自然可以区分出来。如果每个项目的账号密码都一样,那么只是使用同一个Model。
- 然 2015-06-03 已签到连续签到3天,获得了15个金钱
- 然 2015-06-02 已签到连续签到2天,获得了10个金钱
- 然 2015-06-01 已签到连续签到1天,获得了5个金钱