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

31 lines
839 B
PHP

<?php
namespace Modules\Withdraw\Http\Resources\Withdraw;
use Illuminate\Http\Resources\Json\JsonResource;
class WithdrawResource extends JsonResource
{
public function toArray($request): array
{
return [
'withdraw_id' => $this->id,
'status' => [
'status' => $this->status,
'status_text' => $this->status_text,
],
'amount' => $this->amount,
'tax' => $this->tax,
'take' => $this->take,
'payment_at' => (string) $this->payment_at,
'way' => '红包提现',
'quantity' => $this->source[config('withdraw.account')] ?? '',
'source' => $this->source,
'create_at' => (string) $this->created_at,
];
}
}