File tree Expand file tree Collapse file tree 2 files changed +17
-17
lines changed
Expand file tree Collapse file tree 2 files changed +17
-17
lines changed Original file line number Diff line number Diff line change 44
55use DateTimeInterface ;
66use Illuminate \Database \Eloquent \Model ;
7+ use Illuminate \Database \Eloquent \Relations \MorphTo ;
78use Illuminate \Support \Facades \Config ;
89use OwenIt \Auditing \Contracts \AttributeEncoder ;
910
@@ -30,6 +31,22 @@ trait Audit
3031 */
3132 protected $ modified = [];
3233
34+ /**
35+ * {@inheritdoc}
36+ */
37+ public function auditable (): MorphTo
38+ {
39+ return $ this ->morphTo ();
40+ }
41+
42+ /**
43+ * {@inheritdoc}
44+ */
45+ public function user (): MorphTo
46+ {
47+ return $ this ->morphTo ();
48+ }
49+
3350 /**
3451 * {@inheritdoc}
3552 */
Original file line number Diff line number Diff line change 33namespace OwenIt \Auditing \Models ;
44
55use Illuminate \Database \Eloquent \Model ;
6- use Illuminate \Database \Eloquent \Relations \MorphTo ;
76
87class Audit extends Model implements \OwenIt \Auditing \Contracts \Audit
98{
@@ -22,20 +21,4 @@ class Audit extends Model implements \OwenIt\Auditing\Contracts\Audit
2221 'new_values ' => 'json ' ,
2322 'auditable_id ' => 'integer ' ,
2423 ];
25-
26- /**
27- * {@inheritdoc}
28- */
29- public function auditable (): MorphTo
30- {
31- return $ this ->morphTo ();
32- }
33-
34- /**
35- * {@inheritdoc}
36- */
37- public function user (): MorphTo
38- {
39- return $ this ->morphTo ();
40- }
4124}
You can’t perform that action at this time.
0 commit comments