Add filters

This commit is contained in:
Ludovic CANDELLIER
2021-11-01 23:42:53 +01:00
parent 459d35e8a1
commit f5716c6530
18 changed files with 148 additions and 35 deletions

View File

@@ -27,4 +27,9 @@ class Variation extends Model
{
return $this->hasMany(Offer::class);
}
public function scopeByPackage($query, $package_id)
{
return $query->where($this->table . '.package_id', $package_id);
}
}