add methods to detect distinct product type et article nature on shelve

This commit is contained in:
Ludovic CANDELLIER
2023-04-01 22:01:15 +02:00
parent bc1cf1190b
commit 6649c32501
4 changed files with 59 additions and 10 deletions

View File

@@ -39,4 +39,9 @@ class ArticleNature extends Model
{
return $query->where($this->table . '.product_type', $type);
}
public function scopeByIds($query, $ids)
{
return $query->whereIn($this->table . '.id', $ids);
}
}