Allowed to use magic methods for finding active records by attributes
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.
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);
}
}