Example #1
0
 /**
  * Load the data.
  */
 private function loadData()
 {
     foreach ($this->store->all() as $setting) {
         /** @var  \Arcanesoft\Settings\Models\Setting  $setting */
         $data = $this->data->get($setting->domain, []);
         Arr::set($data, $setting->key, $setting->casted_value);
         $this->data->put($setting->domain, $data);
     }
 }
Example #2
0
 /**
  * Get a module by key
  *
  * @param  string  $key
  * @param  mixed   $default
  *
  * @return Module
  */
 public function get($key, $default = null)
 {
     $key = str_slug($key);
     return parent::get($key, $default);
 }
Example #3
0
 /**
  * Get a log.
  *
  * @param  string      $date
  * @param  mixed|null  $default
  *
  * @return \Arcanedev\LogViewer\Entities\Log
  *
  * @throws \Arcanedev\LogViewer\Exceptions\LogNotFoundException
  */
 public function get($date, $default = null)
 {
     if (!$this->has($date)) {
         throw new LogNotFoundException("Log not found in this date [{$date}]");
     }
     return parent::get($date, $default);
 }
Example #4
0
 /**
  * Get a log.
  *
  * @param  string     $date
  * @param  mixed|null $default
  *
  * @return Log
  *
  * @throws LogNotFound
  */
 public function get($date, $default = null)
 {
     if (!$this->has($date)) {
         throw new LogNotFound('Log not found in this date [' . $date . ']');
     }
     return parent::get($date, $default);
 }
 /**
  * Get an item from the collection by key.
  *
  * @param  string  $key
  * @param  mixed   $default
  *
  * @return \Arcanedev\LaravelLang\Entities\Locale|mixed
  */
 public function get($key, $default = null)
 {
     return parent::get($key, $default);
 }
Example #6
0
 /**
  * Get the specified attribute from json file.
  *
  * @param  string      $key
  * @param  mixed|null  $default
  *
  * @return mixed
  */
 public function get($key, $default = null)
 {
     return $this->attributes->get($key, $default);
 }
Example #7
0
 /**
  * Check if the entry is updated.
  *
  * @param  string  $domain
  * @param  string  $key
  * @param  mixed   $value
  *
  * @return bool
  */
 private function isUpdated($domain, $key, $value)
 {
     return array_get($this->saved->get($domain, []), $key) !== $value;
 }