updated resource response format
This commit is contained in:
parent
8a8c9b0a7d
commit
a39812cdb3
|
|
@ -15,16 +15,20 @@ class ApplicationStatusResource extends JsonResource
|
||||||
public function toArray($request)
|
public function toArray($request)
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'legal_number' => $this->legalization_number,
|
'legal' => [
|
||||||
'legal_expires_at' => !is_null($this->expires_at)?$this->expires_at->format('d.m.Y'):null,
|
'number' => $this->legalization_number,
|
||||||
'legal_can_apply' => $this->can_apply,
|
'expires_at' => !is_null($this->expires_at)?$this->expires_at->format('d.m.Y'):null,
|
||||||
'legal_can_extend' => $this->can_extend,
|
'can_apply' => $this->can_apply,
|
||||||
'legal_app_status' => $this->application_status,
|
'can_extend' => $this->can_extend,
|
||||||
'broker_number' => $this->broker_number,
|
'app_status' => $this->application_status,
|
||||||
'broker_expires_at' => !is_null($this->broker_expires_at)?$this->broker_expires_at->format('d.m.Y'):null,
|
],
|
||||||
'broker_can_apply' => $this->can_apply_broker,
|
'broker' => [
|
||||||
'broker_can_extend' => $this->can_extend_broker,
|
'number' => $this->broker_number,
|
||||||
'broker_app_status' => $this->application_broker_status,
|
'expires_at' => !is_null($this->broker_expires_at)?$this->broker_expires_at->format('d.m.Y'):null,
|
||||||
|
'can_apply' => $this->can_apply_broker,
|
||||||
|
'can_extend' => $this->can_extend_broker,
|
||||||
|
'app_status' => $this->application_broker_status,
|
||||||
|
]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue