Custom Price / Land / User Order Homeparty
This commit is contained in:
parent
d46824a4ac
commit
51d81d8ec6
55 changed files with 1951 additions and 681 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Models\ShippingCountry as ModelsShippingCountry;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
|
|
@ -50,4 +51,17 @@ class ShippingCountry extends Model
|
|||
return $this->hasMany('App\Models\ShoppingOrder', 'country_id');
|
||||
}
|
||||
|
||||
|
||||
public static function getActiveShippingCountries(){
|
||||
$ret = [];
|
||||
$ShippingCountries = ShippingCountry::all();
|
||||
foreach($ShippingCountries as $ShippingCountry){
|
||||
if($ShippingCountry->shipping->active){
|
||||
$ret[$ShippingCountry->country_id] = $ShippingCountry->country->getLocated();
|
||||
}
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue