add whatsup logic

This commit is contained in:
root
2026-03-10 16:31:35 -04:00
parent 20ee70d153
commit 3bf4c687da
33 changed files with 2800 additions and 1329 deletions
@@ -0,0 +1,25 @@
<?php
namespace App\Http\Resources\Whatsapp;
use Illuminate\Http\Resources\Json\JsonResource;
class WhatsappClassSectionParentResource extends JsonResource
{
public function toArray($request): array
{
return [
'class_section_id' => (int) ($this['class_section_id'] ?? 0),
'primary_id' => (int) ($this['primary_id'] ?? 0),
'primary_name' => (string) ($this['primary_name'] ?? ''),
'primary_phone' => (string) ($this['primary_phone'] ?? ''),
'primary_email' => (string) ($this['primary_email'] ?? ''),
'second_id' => (int) ($this['second_id'] ?? 0),
'second_name' => (string) ($this['second_name'] ?? ''),
'second_phone' => (string) ($this['second_phone'] ?? ''),
'second_email' => (string) ($this['second_email'] ?? ''),
'primary_member' => $this['primary_member'] ?? null,
'second_member' => $this['second_member'] ?? null,
];
}
}