'Berater Bestellungen', 2 => 'Promotion Bestellungen', 3 => 'Shop Bestellungen', ]; public function shipping() { return $this->belongsTo('App\Models\Shipping', 'shipping_id'); } public function getShippingForType(){ return isset(self::$shippingForTypes[$this->shipping_for]) ? self::$shippingForTypes[$this->shipping_for] : ""; } public function setPriceAttribute($value) { $this->attributes['price'] = $value ? Util::reFormatNumber($value) : null; } public function setPriceCompAttribute($value) { $this->attributes['price_comp'] = $value ? Util::reFormatNumber($value) : null; } public function setFactorAttribute($value) { $this->attributes['factor'] = $value ? Util::reFormatNumber($value) : null; } public function setTaxRateAttribute($value) { $this->attributes['tax_rate'] = $value ? Util::reFormatNumber($value) : null; } public function setTotalFromAttribute($value) { $this->attributes['total_from'] = $value ? Util::reFormatNumber($value) : null; } public function setTotalToAttribute($value) { $this->attributes['total_to'] = $value ? Util::reFormatNumber($value) : null; } public function getFormattedPrice() { return isset($this->attributes['price']) ? Util::formatNumber($this->attributes['price']) : ""; } public function getFormattedPriceComp() { return isset($this->attributes['price_comp']) ? Util::formatNumber($this->attributes['price_comp']) : ""; } public function getFormattedTaxRate() { return isset($this->attributes['tax_rate']) ? Util::formatNumber($this->attributes['tax_rate']) : ""; } public function getFormattedFactor() { return isset($this->attributes['factor']) ? Util::formatNumber($this->attributes['factor']) : ""; } public function getFormatTotalFrom() { return isset($this->attributes['total_from']) ? Util::formatNumber($this->attributes['total_from']) : ""; } public function getFormattedTotalTo() { return isset($this->attributes['total_to']) ? Util::formatNumber($this->attributes['total_to']) : ""; } }