/** * */ public function __construct() { $this->properties = new Collection(); if (auth()->check()) { $this->addProperty(auth()->user()->id); $this->addProperty(Prefs::lastActivity()); } }
/** * @return mixed|static */ public function getDefaultCurrency() { $cache = new CacheProperties(); $cache->addProperty('getDefaultCurrency'); if ($cache->has()) { return $cache->get(); } $currencyPreference = Prefs::get('currencyPreference', 'EUR'); $currency = TransactionCurrency::whereCode($currencyPreference->data)->first(); $cache->store($currency); return $currency; }
/** * */ public function __construct() { $this->properties = new Collection(); $this->addProperty(Auth::user()->id); $this->addProperty(Prefs::lastActivity()); }
/** * @return mixed|static */ public function getDefaultCurrency() { $currencyPreference = Prefs::get('currencyPreference', 'EUR'); $currency = TransactionCurrency::whereCode($currencyPreference->data)->first(); return $currency; }