@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | |
9 | 9 | class Variable extends Model |
10 | 10 | { |
11 | - use HasEpesiConnection; |
|
11 | + use HasEpesiConnection; |
|
12 | 12 | |
13 | 13 | /** |
14 | 14 | * @var Collection |
@@ -27,12 +27,12 @@ discard block |
||
27 | 27 | |
28 | 28 | public function init(): void |
29 | 29 | { |
30 | - parent::init(); |
|
30 | + parent::init(); |
|
31 | 31 | |
32 | - $this->addFields([ |
|
33 | - 'name', |
|
34 | - 'value' => ['type' => 'text', 'serialize' => 'json'] |
|
35 | - ]); |
|
32 | + $this->addFields([ |
|
33 | + 'name', |
|
34 | + 'value' => ['type' => 'text', 'serialize' => 'json'] |
|
35 | + ]); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | public static function recall($name, $default = null) { |
@@ -57,10 +57,10 @@ discard block |
||
57 | 57 | $variable = self::create()->addCondition('name', $name)->tryLoadAny(); |
58 | 58 | |
59 | 59 | if ($variable->loaded()) { |
60 | - $variable->save(compact('value')); |
|
60 | + $variable->save(compact('value')); |
|
61 | 61 | } |
62 | 62 | else { |
63 | - $variable->insert(compact('name', 'value')); |
|
63 | + $variable->insert(compact('name', 'value')); |
|
64 | 64 | } |
65 | 65 | } |
66 | 66 |