fix on weight

This commit is contained in:
ludo
2023-11-13 00:40:41 +01:00
parent 741f389620
commit 7ec1d3e89b
7 changed files with 74 additions and 18 deletions

View File

@@ -113,6 +113,11 @@ class Offer extends Model
return $query->where($this->table.'.stock_current', '>', 0);
}
public function scopeByIds($query, $ids)
{
return $query->whereIn('id', $ids);
}
public function scopeByArticleNature($query, $article_nature_id)
{
return $query->whereHas('article.article_nature', function ($query) use ($article_nature_id) {