We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a778fcb commit c021895Copy full SHA for c021895
core/model/Model.php
@@ -35,7 +35,7 @@ private function fields($dados = null)
35
foreach ($dados as $k => $v) {
36
$fields[] = $k;
37
}
38
- $fields = implode(',', $fields);
+ $fields = implode(',', $fields);
39
40
return $fields;
41
@@ -113,12 +113,13 @@ public function save($dados)
113
114
if (isset($dados[$this->pk])) {
115
$this->find([$this->pk => $dados[$this->pk]]);
116
- if ($this->count > 0) {
117
- $this->update($dados);
118
- } else {
119
- $this->create($dados);
120
- }
121
+
+ if ($this->count > 0) {
+ return $this->update($dados);
+ }
122
+ return $this->create($dados);
123
124
125
public function update($dados)
0 commit comments