Closed andreCatita closed 9 years ago
namespace app\models;
use yii\db\ActiveQuery;
class ProductsQuery extends ActiveQuery
{
use MultilingualTrait;
public function visible(){
// ...
}
}
@andreCatita see in the end of file https://github.com/OmgDef/yii2-multilingual-behavior/blob/master/README.md
Thanks. Didn't pay close attention.
Hello again @OmgDef,
How do you handle Custom Scoping, with your MultlingualBehavior? Do we at all?
Example:
and usually I create a ProductsQuery with the function below:
But I need to overwrite find() in my Model to something like:
The obvious and current problem is:
is there anyway to apply Custom Scoping, and use the MultilingualBehavior across multiple Models?