inspirenmy/yii2-models

Yii2 models library

Installs: 945

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 1

Type:yii2-extension

v1.0.1 2017-09-21 06:05 UTC

This package is not auto-updated.

Last update: 2020-08-08 06:46:01 UTC


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:

#####Usage:

class AnyModel extends \inspirenmy\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 \inspirenmy\models\Model {...}

in controller use ajax validation

if (!is_null($validate = $model->performAjaxValidation()))
            return $validate;