add owner type column to transaction resource to help with bank mapping function in exchange

This commit is contained in:
Omair Saleh
2023-06-21 13:25:56 +08:00
parent 4a9e89c752
commit 99efce22db
@@ -22,6 +22,7 @@ class TransactionResource extends JsonResource
{
return [
'id' => $this->id,
'owner_type' => $this->owner_type,
'order' => ($this->owner instanceof Transaction) ? new OrderResource($this->owner->owner->owner) : new OrderResource($this->owner->owner),
'documents' => DocumentResource::collection($this->documents),
'type' => (int) $this->type,