bigdropinc / yii2-find-by-attribute
Allowed to use magic methods for finding active records by attributes
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Type:yii2-extension
Requires
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2024-11-10 02:34:58 UTC
README
Allowed to use magic methods for finding active records by attributes
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist bigdropinc/yii2-find-by-attribute "*"
or add
"bigdropinc/yii2-find-by-attribute": "*"
to the require section of your composer.json
file.
Usage
Add into your base Active Record method like this
use bigdropinc\db\FindByAttribute
public static function __callStatic($name, $arguments)
{
if(static::isFindByCanProcess($name)){
return static::processFindBy($name, $arguments);
}
}