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