Files
water-back/modules/Withdraw/Http/Resources/Account/UserBankAccountResource.php
2023-01-12 14:47:38 +08:00

27 lines
736 B
PHP

<?php
namespace Modules\Withdraw\Http\Resources\Account;
use Illuminate\Http\Resources\Json\JsonResource;
class UserBankAccountResource extends JsonResource
{
public function toArray($request): array
{
return [
'bank_account_id' => $this->id,
'bank' => [
'id' => $this->bank_id,
'name' => $this->bank->name,
'cover' => $this->bank->cover_url,
],
'name' => $this->name,
'no' => $this->no,
'branch_name' => $this->branch_name,
'mobile' => $this->mobile,
'created_at' => (string) $this->created_at,
];
}
}