Add Plan Limit & Usage
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Resources\OLDLMS;
|
||||
|
||||
use App\Services\ClaimService;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class MemberResource extends JsonResource
|
||||
@@ -27,16 +28,18 @@ class MemberResource extends JsonResource
|
||||
'plan' => $currentMemberPlan ? [
|
||||
'code' => $currentMemberPlan->plan->code ?? null,
|
||||
'start' => $currentMemberPlan->start,
|
||||
'end' => $currentMemberPlan->end
|
||||
'end' => $currentMemberPlan->end,
|
||||
'limit' => $this->currentPlan->limit_rules
|
||||
] : null,
|
||||
'policy_code' => $this->currentPolicy->code,
|
||||
'policy_code' => $this->currentPolicy?->code ?? null,
|
||||
'corporate' => [
|
||||
'code' => $this->currentPolicy->corporate->code,
|
||||
'name' => $this->currentPolicy->corporate->name,
|
||||
'welcome_message' => $this->currentPolicy->corporate->welcome_message,
|
||||
'help_text' => $this->currentPolicy->corporate->help_text,
|
||||
'avatar_url' => $this->currentpolicy->corporate->avatar_url
|
||||
]
|
||||
'code' => $this->currentPolicy?->corporate->code ?? null,
|
||||
'name' => $this->currentPolicy?->corporate->name,
|
||||
'welcome_message' => $this->currentPolicy?->corporate?->welcome_message,
|
||||
'help_text' => $this->currentPolicy?->corporate?->help_text,
|
||||
'avatar_url' => $this->currentpolicy?->corporate?->avatar_url
|
||||
],
|
||||
'limit_usage' => $this->totalUsage ?? null
|
||||
];
|
||||
return $data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user