array_get deprecated

This commit is contained in:
Deon George
2020-01-11 22:05:05 +11:00
parent c941fcb148
commit 34c0380c99
6 changed files with 12 additions and 10 deletions

View File

@@ -4,7 +4,6 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Auth;
use Illuminate\Http\Request;
use App\Traits\NextKey;
@@ -68,13 +67,13 @@ class Product extends Model
public function getDefaultBillingAttribute()
{
return array_get($this->PricePeriods(),$this->price_recurr_default);
return Arr::get($this->PricePeriods(),$this->price_recurr_default);
}
public function getDefaultCostAttribute()
{
// @todo Integrate this into a Tax::class
return array_get($this->price_array,sprintf('%s.1.price_base',$this->price_recurr_default))*1.1;
return Arr::get($this->price_array,sprintf('%s.1.price_base',$this->price_recurr_default))*1.1;
}
private function getDefaultLanguage()
@@ -102,7 +101,7 @@ class Product extends Model
8=>1/60,
];
return $this->setup_cost + ( $this->default_cost * array_get($table,$this->price_recurr_default) * $this->contract_term);
return $this->setup_cost + ( $this->default_cost * Arr::get($table,$this->price_recurr_default) * $this->contract_term);
}
public function getNameAttribute(Language $lo=NULL)
@@ -148,7 +147,7 @@ class Product extends Model
public function getSetupCostAttribute()
{
// @todo Integrate this into a Tax::class
return array_get($this->price_array,sprintf('%s.1.price_setup',$this->price_recurr_default))*1.1;
return Arr::get($this->price_array,sprintf('%s.1.price_setup',$this->price_recurr_default))*1.1;
}
public function scopeActive()