/**
  *
  */
 public function __construct()
 {
     $this->properties = new Collection();
     if (auth()->check()) {
         $this->addProperty(auth()->user()->id);
         $this->addProperty(Prefs::lastActivity());
     }
 }
Пример #2
0
 /**
  * @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;
 }
Пример #3
0
 /**
  *
  */
 public function __construct()
 {
     $this->properties = new Collection();
     $this->addProperty(Auth::user()->id);
     $this->addProperty(Prefs::lastActivity());
 }
Пример #4
0
 /**
  * @return mixed|static
  */
 public function getDefaultCurrency()
 {
     $currencyPreference = Prefs::get('currencyPreference', 'EUR');
     $currency = TransactionCurrency::whereCode($currencyPreference->data)->first();
     return $currency;
 }