Add prices and filtering by sale_channel with default
This commit is contained in:
@@ -23,4 +23,9 @@ class SaleChannel extends Model
|
||||
{
|
||||
return $this->hasManyThrough(Tariff::class, PriceList::class, 'sale_channel_id', 'id', 'id', 'tariff_id');
|
||||
}
|
||||
|
||||
public function scopeByCode($query, $code)
|
||||
{
|
||||
return $query->where($this->table . '.code', $code);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user