ActivityService::add(ActivityType::COMMENT_CREATE, $comment);
ActivityService::add(ActivityType::COMMENTED_ON, $entity);
+ $comment->refresh()->unsetRelations();
return $comment;
}
--- /dev/null
+{
+ "page_id": 2646,
+ "html": "<p>Can the title be updated?</p>",
+ "content_ref": "bkmrk-page-title:7341676876991010:3-14"
+}
\ No newline at end of file
--- /dev/null
+{
+ "html": "<p>Can this comment be updated??????</p>",
+ "archived": true
+}
\ No newline at end of file
--- /dev/null
+{
+ "id": 167,
+ "commentable_id": 2646,
+ "commentable_type": "page",
+ "parent_id": null,
+ "local_id": 29,
+ "created_by": 1,
+ "updated_by": 1,
+ "created_at": "2025-10-24T14:05:41.000000Z",
+ "updated_at": "2025-10-24T14:05:41.000000Z",
+ "content_ref": "bkmrk-page-title:7341676876991010:3-14",
+ "archived": false
+}
\ No newline at end of file
--- /dev/null
+{
+ "data": [
+ {
+ "id": 1,
+ "commentable_id": 2607,
+ "commentable_type": "page",
+ "parent_id": null,
+ "local_id": 1,
+ "content_ref": "",
+ "created_by": 1,
+ "updated_by": 1,
+ "created_at": "2022-04-20T08:43:27.000000Z",
+ "updated_at": "2022-04-20T08:43:27.000000Z"
+ },
+ {
+ "id": 18,
+ "commentable_id": 2607,
+ "commentable_type": "page",
+ "parent_id": 1,
+ "local_id": 2,
+ "content_ref": "",
+ "created_by": 3,
+ "updated_by": 3,
+ "created_at": "2022-11-15T08:12:35.000000Z",
+ "updated_at": "2022-11-15T08:12:35.000000Z"
+ }
+ ],
+ "total": 88
+}
\ No newline at end of file
--- /dev/null
+{
+ "id": 22,
+ "commentable_id": 2646,
+ "commentable_type": "page",
+ "html": "<p>This page looks great!<\/p>\n",
+ "parent_id": null,
+ "local_id": 2,
+ "created_by": {
+ "id": 1,
+ "name": "Admin",
+ "slug": "admin"
+ },
+ "updated_by": {
+ "id": 1,
+ "name": "Admin",
+ "slug": "admin"
+ },
+ "created_at": "2023-06-07T07:50:56.000000Z",
+ "updated_at": "2023-06-07T07:50:56.000000Z",
+ "content_ref": "",
+ "archived": false,
+ "replies": [
+ {
+ "id": 34,
+ "commentable_id": 2646,
+ "commentable_type": "page",
+ "html": "<p>Thanks for the comment!<\/p>\n",
+ "parent_id": 2,
+ "local_id": 10,
+ "created_by": 2,
+ "updated_by": 2,
+ "created_at": "2023-06-07T13:46:25.000000Z",
+ "updated_at": "2023-06-07T13:46:25.000000Z",
+ "content_ref": "",
+ "archived": false
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+{
+ "id": 167,
+ "commentable_id": 2646,
+ "commentable_type": "page",
+ "parent_id": null,
+ "local_id": 29,
+ "created_by": 1,
+ "updated_by": 1,
+ "created_at": "2025-10-24T14:05:41.000000Z",
+ "updated_at": "2025-10-24T14:09:56.000000Z",
+ "content_ref": "bkmrk-page-title:7341676876991010:3-14",
+ "archived": true
+}
\ No newline at end of file
"revision_count": 5,
"template": false,
"editor": "wysiwyg",
+ "comments": {
+ "active": [
+ {
+ "comment": {
+ "id": 22,
+ "commentable_id": 306,
+ "commentable_type": "page",
+ "html": "<p>Does this need revising?<\/p>\n",
+ "parent_id": null,
+ "local_id": 1,
+ "created_by": {
+ "id": 1,
+ "name": "Admin",
+ "slug": "admin"
+ },
+ "updated_by": 1,
+ "created_at": "2023-06-07T07:50:56.000000Z",
+ "updated_at": "2023-06-07T07:50:56.000000Z",
+ "content_ref": "",
+ "archived": false
+ },
+ "depth": 0,
+ "children": [
+ {
+ "comment": {
+ "id": 34,
+ "commentable_id": 2646,
+ "commentable_type": "page",
+ "html": "<p>I think it's okay!<\/p>\n",
+ "parent_id": 1,
+ "local_id": 2,
+ "created_by": {
+ "id": 2,
+ "name": "Editor",
+ "slug": "editor"
+ },
+ "updated_by": 1,
+ "created_at": "2023-06-07T13:46:25.000000Z",
+ "updated_at": "2023-06-07T13:46:25.000000Z",
+ "content_ref": "",
+ "archived": false
+ },
+ "depth": 1,
+ "children": []
+ }
+ ]
+ }
+ ],
+ "archived": [
+ {
+ "comment": {
+ "id": 21,
+ "commentable_id": 2646,
+ "commentable_type": "page",
+ "html": "<p>The title needs to be fixed<\/p>\n",
+ "parent_id": null,
+ "local_id": 3,
+ "created_by": {
+ "id": 2,
+ "name": "Editor",
+ "slug": "editor"
+ },
+ "updated_by": 1,
+ "created_at": "2023-06-07T07:50:49.000000Z",
+ "updated_at": "2025-10-24T08:37:22.000000Z",
+ "content_ref": "",
+ "archived": true
+ },
+ "depth": 0,
+ "children": []
+ }
+ ]
+ },
"tags": [
{
"name": "Category",