feat(portal): lead module, WHMCS sync report/contacts/mapping, service lifecycle email templates
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
3c7710f1de
commit
a443ec3bf6
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Lead\App\Http\Resources;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class LeadResource extends JsonResource
|
||||
{
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
return [
|
||||
'uuid' => $this->uuid,
|
||||
'fullname' => $this->fullname,
|
||||
'company' => $this->company,
|
||||
'email' => $this->email,
|
||||
'phone' => $this->phone,
|
||||
'address' => $this->address,
|
||||
'source' => $this->source,
|
||||
'status' => $this->status,
|
||||
'whmcs_client_id' => $this->whmcs_client_id,
|
||||
'receives_invoice_emails' => $this->receives_invoice_emails,
|
||||
'receives_domain_emails' => $this->receives_domain_emails,
|
||||
'receives_support_emails' => $this->receives_support_emails,
|
||||
'receives_product_emails' => $this->receives_product_emails,
|
||||
'receives_general_emails' => $this->receives_general_emails,
|
||||
'note' => $this->note,
|
||||
'customer' => $this->whenLoaded('customer', fn () => $this->customer ? [
|
||||
'id' => $this->customer->id,
|
||||
'uuid' => $this->customer->uuid,
|
||||
'fullname' => $this->customer->fullname,
|
||||
'email' => $this->customer->email,
|
||||
] : null),
|
||||
'created_at' => $this->created_at,
|
||||
'updated_at' => $this->updated_at,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user