]> BookStack Code Mirror - bookstack/blobdiff - app/Activity/Tools/ActivityLogger.php
API: Added audit log list endpoint
[bookstack] / app / Activity / Tools / ActivityLogger.php
index adda36c1b813a3f2728ae4c3eec64416fd1e8b64..415d1108494822522963286a9ed8598c29f89053 100644 (file)
@@ -32,8 +32,8 @@ class ActivityLogger
         $activity->detail = $detailToStore;
 
         if ($detail instanceof Entity) {
-            $activity->entity_id = $detail->id;
-            $activity->entity_type = $detail->getMorphClass();
+            $activity->loggable_id = $detail->id;
+            $activity->loggable_type = $detail->getMorphClass();
         }
 
         $activity->save();
@@ -64,9 +64,9 @@ class ActivityLogger
     public function removeEntity(Entity $entity): void
     {
         $entity->activity()->update([
-            'detail'       => $entity->name,
-            'entity_id'    => null,
-            'entity_type'  => null,
+            'detail'         => $entity->name,
+            'loggable_id'    => null,
+            'loggable_type'  => null,
         ]);
     }