add controllers, servoices

This commit is contained in:
root
2026-03-09 02:52:13 -04:00
parent c8de5f7edc
commit d76c871cb7
501 changed files with 34439 additions and 21843 deletions
@@ -0,0 +1,31 @@
<?php
namespace App\Http\Resources\ExtraCharges;
use Illuminate\Http\Resources\Json\JsonResource;
class ExtraChargeResource extends JsonResource
{
public function toArray($request): array
{
$data = is_array($this->resource) ? $this->resource : $this->resource->toArray();
return [
'id' => (int) ($data['id'] ?? 0),
'parent_id' => $data['parent_id'] ?? null,
'invoice_id' => $data['invoice_id'] ?? null,
'school_year' => $data['school_year'] ?? null,
'semester' => $data['semester'] ?? null,
'charge_type' => $data['charge_type'] ?? null,
'title' => $data['title'] ?? null,
'description' => $data['description'] ?? null,
'amount' => $data['amount'] ?? null,
'due_date' => $data['due_date'] ?? null,
'status' => $data['status'] ?? null,
'created_by' => $data['created_by'] ?? null,
'created_at' => $data['created_at'] ?? null,
'parent_name' => $data['parent_name'] ?? null,
'invoice_number' => $data['invoice_number'] ?? null,
];
}
}