demmonico/yii2-models
最新稳定版本:v1.0.0
Composer 安装命令:
composer require demmonico/yii2-models
包简介
Yii2 models library
README 文档
README
#Yii2 models library ##Description Yii2 models library which used in web-application development.
##Composition ###ActiveRecord
ActiveRecord model overload parent \yii\db\ActiveRecord.
This add features:
- sanitize rules (see https://github.com/demmonico/yii2-behaviors)
- TimestampBehavior for autocomplete create and update date fields if they exists in any child model
- autocollect model saving errors at application logs.
#####Usage:
class AnyModel extends \demmonico\models\ActiveRecord {...}
###Model
Model model overload parent \yii\base\Model.
This add features:
- sanitize rules (see https://github.com/demmonico/yii2-behaviors)
- perform ajax validation method (see https://github.com/demmonico/yii2-traits).
So sanitize rule can inherits by any form.
#####Usage:
in model
class AnyForm extends \demmonico\models\Model {...}
in controller use ajax validation
if (!is_null($validate = $model->performAjaxValidation())) return $validate;
统计信息
- 总下载量: 3.29k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-08-22