This commit is contained in:
Ludovic CANDELLIER
2021-03-29 23:46:01 +02:00
parent 4855254a7f
commit 993154674e
28 changed files with 300 additions and 105 deletions

View File

@@ -14,6 +14,11 @@ class Package extends Model
return $this->belongsTo('App\Models\Shop\ArticleFamily');
}
public function unities()
{
return $this->hasMany('App\Models\Shop\Unity');
}
public function scopeByFamily($query, $id)
{
return $query->where('article_family_id', $id);