visuddhinanda 2 tahun lalu
induk
melakukan
4d5a85c69b
1 mengubah file dengan 10 tambahan dan 1 penghapusan
  1. 10 1
      app/Http/Resources/SentHistoryResource.php

+ 10 - 1
app/Http/Resources/SentHistoryResource.php

@@ -3,6 +3,7 @@
 namespace App\Http\Resources;
 
 use Illuminate\Http\Resources\Json\JsonResource;
+use App\Http\Api\UserApi;
 
 class SentHistoryResource extends JsonResource
 {
@@ -14,6 +15,14 @@ class SentHistoryResource extends JsonResource
      */
     public function toArray($request)
     {
-        return parent::toArray($request);
+        $data = [
+            'id' => $this->id,
+            'sent_uid' => $this->sent_uid,
+            "editor" => UserApi::getByUuId($this->user_uid),
+            'content' => $this->content,
+            'landmark' => $this->landmark,
+            'created_at' => $this->created_at
+        ];
+        return $data;
     }
 }