update api and add more features

This commit is contained in:
root
2026-06-04 02:24:41 -04:00
parent fa6c9519a0
commit 4e33882ac7
131 changed files with 34596 additions and 340 deletions
@@ -0,0 +1,24 @@
<?php
namespace App\Http\Resources\Promotions;
use Illuminate\Http\Resources\Json\JsonResource;
class PromotionReminderResource extends JsonResource
{
public function toArray($request): array
{
return [
'id' => (int) ($this->id ?? 0),
'promotion_id' => (int) ($this->promotion_id ?? 0),
'student_id' => $this->student_id ? (int) $this->student_id : null,
'parent_id' => $this->parent_id ? (int) $this->parent_id : null,
'reminder_type' => $this->reminder_type,
'channel' => $this->channel,
'subject' => $this->subject,
'message' => $this->message,
'sent_at' => optional($this->sent_at)->toDateTimeString(),
'sent_by' => $this->sent_by ? (int) $this->sent_by : null,
];
}
}