public function saveModel(array $data) { foreach ($data as $k => $v) { $this->model->{$k} = $v; } return $this->model->save(); }