31 lines
839 B
PHP
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,
|
|
];
|
|
}
|
|
|
|
}
|