Example #1
0
 /**
  * Repo: 设置某项配置的值
  *
  * @param string $id
  * @param mixed $value
  * @return $this
  */
 public function setValue($id, $value)
 {
     $setting = parent::__invoke();
     $setting->findOrInitById($id);
     $setting->save(['value' => $value]);
     return $this;
 }
Example #2
0
 public function afterDestroy()
 {
     parent::afterDestroy();
     $this->clearRecordCache();
 }