We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4301d66 commit 230cf53Copy full SHA for 230cf53
src/OwenIt/Auditing/Log.php
@@ -6,8 +6,17 @@
6
7
class Log extends Model
8
{
9
+ /**
10
+ * @var string
11
+ */
12
public $table = 'logs';
13
14
15
+ * Cast values
16
+ * @var array
17
18
+ protected $casts = ['old_value' => 'json', 'new_value' => 'json'];
19
+
20
/**
21
* Auditing.
22
*
@@ -32,4 +41,22 @@ public function historyOf()
32
41
}
33
42
return false;
34
43
44
45
46
+ * Get old value
47
+ * @return mixed
48
49
+ public function getOldAttribute()
50
+ {
51
+ return $this->old_value;
52
+ }
53
54
55
+ * Get new value
56
57
58
+ public function getNewAttribute()
59
60
+ return $this->new_value;
61
35
62
0 commit comments