01 2022 Microsite Promotion
This commit is contained in:
parent
3f1fb9377d
commit
38e7fd504a
39 changed files with 761 additions and 336 deletions
|
|
@ -80,6 +80,13 @@ class Shipping extends Model
|
|||
}
|
||||
|
||||
public function getShippingPricesBy($shipping_for){
|
||||
return $this->hasMany('App\Models\ShippingPrice', 'shipping_id', 'id')->where('shipping_for', $shipping_for);
|
||||
return ShippingPrice::where('shipping_id', $this->id)->where('shipping_for', $shipping_for)->get();
|
||||
}
|
||||
|
||||
public function getShippingPricesFirstBy($shipping_for){
|
||||
return ShippingPrice::where('shipping_id', $this->id)->where('shipping_for', $shipping_for) ->orderBy('price', 'ASC')->first();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue