Add new filters to display on website
This commit is contained in:
@@ -33,4 +33,11 @@ class ArticleAttribute extends Model
|
||||
{
|
||||
return $query->where('attribute_value_id', $id);
|
||||
}
|
||||
|
||||
public function scopeByFamily($query, $id)
|
||||
{
|
||||
return $query->whereHas('attribute_value', function ($query) use ($id) {
|
||||
$query->byFamily($id);
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user