Пример #1
0
 /**
  * @param $selection
  * @param ThemeSettingDefault $default
  * @param $account
  * @param ThemeSetting $setting
  */
 protected function setupJsonDefault($selection, ThemeSettingDefault $default, $account, ThemeSetting $setting)
 {
     $json = json_decode($default->value);
     $type = $setting->type->name;
     $setting->value()->create(['account_id' => $account, 'selection_id' => $selection, 'nl' => [$type => $json->nl], 'en' => [$type => $json->en]]);
 }
Пример #2
0
 /**
  * @param ThemeSetting $setting
  */
 protected function settingJsonHandle(ThemeSetting $setting)
 {
     if (isset($this->defaults[$setting->key])) {
         $setting->defaults()->create(['value' => json_encode($this->defaults[$setting->key])]);
     }
 }
Пример #3
0
 public function down()
 {
     ThemeSetting::whereIn('key', $this->settingKeys())->delete();
 }