fix wallets transaction lists

This commit is contained in:
omair saleh
2022-02-28 11:46:18 +08:00
parent 111b6cea03
commit afacab4ff8
2 changed files with 1 additions and 5 deletions
+1 -1
View File
@@ -62,7 +62,7 @@ class CompanyResource extends JsonResource
$segment = SegmentConstant::where('reference', SegmentConstants::SUPPLIER_CURRENCIES)->where('detail->id', $this->id)->first();
return $segment ? CurrencyResource::collection(Currency::whereIn('id', $segment->detail->currencies)->get()) : [];
}),
'wallets' => $this->banks,
'wallets' => $this->wallets,
'wallet' => new WalletResource($this->wallets()->first()),
'created_at' => $this->created_at->format('d-m-Y')
];
-4
View File
@@ -21,10 +21,6 @@ class Wallet extends AbstractModel implements Transactionable
{
return $this->morphTo();
}
public function company(): BelongsTo
{
return $this->BelongsTo(Company::class, 'owner_id', 'id');
}
/**
* @return morphMany