Add filters
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user