demmonico/yii2-models Yii2 models library

extensioncomponentmodel

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:

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;

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

Comments



v1.0.0 is the latest of one release



MIT license
Stats
0 github stars & 1 github forks
7 downloads in the last day
77 downloads in the last 30 days
1860 total downloads