bigdropinc / yii2-find-by-attribute
Allowed to use magic methods for finding active records by attributes
Package info
github.com/bigdropinc/yii2_find_by_attribute
Type:yii2-extension
pkg:composer/bigdropinc/yii2-find-by-attribute
v0.2
2017-05-16 14:18 UTC
Requires
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2026-03-15 08:51:35 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);
}
}