File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ public function user()
55
55
*/
56
56
public function restore ()
57
57
{
58
- if (class_exists ($ class = $ this ->owner_type )) {
58
+ if (class_exists ($ class = $ this ->getActualClassNameForMorph ( $ this -> owner_type ) )) {
59
59
$ model = $ this ->$ class ->findOrFail ($ this ->owner_id );
60
60
61
61
$ model ->fill ($ this ->old_value );
@@ -103,7 +103,7 @@ public function getElapsedTimeAttribute()
103
103
*/
104
104
public function getCustomMessageAttribute ()
105
105
{
106
- if (class_exists ($ class = $ this ->owner_type )) {
106
+ if (class_exists ($ class = $ this ->getActualClassNameForMorph ( $ this -> owner_type ) )) {
107
107
return $ this ->resolveCustomMessage ($ this ->getCustomMessage ($ class ));
108
108
} else {
109
109
return false ;
@@ -117,7 +117,7 @@ public function getCustomMessageAttribute()
117
117
*/
118
118
public function getCustomFieldsAttribute ()
119
119
{
120
- if (class_exists ($ class = $ this ->owner_type )) {
120
+ if (class_exists ($ class = $ this ->getActualClassNameForMorph ( $ this -> owner_type ) )) {
121
121
$ customFields = [];
122
122
123
123
foreach ($ this ->getCustomFields ($ class ) as $ field => $ message ) {
You can’t perform that action at this time.
0 commit comments