public function update() { foreach ($this->changed as $key => $value) { DB::table('settings')->where('key', $key)->update(['value' => $value]); } array_replace($this->items, $this->changed); }