22 lines
869 B
PHP
22 lines
869 B
PHP
<?php
|
|
|
|
namespace App\Http\Resources\Voucher;
|
|
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class VoucherAgentResource extends JsonResource
|
|
{
|
|
public function toArray(Request $request): array
|
|
{
|
|
return [
|
|
'id' => $this->id, 'uuid' => $this->uuid, 'tenant_id' => $this->tenant_id,
|
|
'user_id' => $this->user_id, 'user' => $this->whenLoaded('user'), 'agent_code' => $this->agent_code,
|
|
'payment_type' => $this->payment_type, 'price_mode' => $this->price_mode,
|
|
'discount_percent' => $this->discount_percent, 'commission_percent' => $this->commission_percent,
|
|
'credit_limit' => $this->credit_limit, 'outstanding_balance' => $this->outstanding_balance,
|
|
'status' => $this->status, 'notes' => $this->notes, 'created_at' => $this->created_at,
|
|
];
|
|
}
|
|
}
|