add more controller

This commit is contained in:
root
2026-03-10 00:48:32 -04:00
parent 5eeaec0257
commit 20ee70d153
151 changed files with 9481 additions and 8407 deletions
@@ -0,0 +1,27 @@
<?php
namespace App\Http\Resources\Students;
use Illuminate\Http\Resources\Json\JsonResource;
class StudentAssignmentResource extends JsonResource
{
public function toArray($request): array
{
return [
'student_id' => (int) ($this['student_id'] ?? 0),
'name' => (string) ($this['name'] ?? ''),
'age' => $this['age'] ?? null,
'email' => $this['email'] ?? null,
'phone' => $this['phone'] ?? null,
'registration_grade' => $this['registration_grade'] ?? null,
'class_section_name' => $this['class_section_name'] ?? null,
'class_section_names' => $this['class_section_names'] ?? [],
'class_section_ids' => $this['class_section_ids'] ?? [],
'new_student' => $this['new_student'] ?? null,
'registration_date' => $this['registration_date'] ?? null,
'school_year' => $this['school_year'] ?? null,
'semester' => $this['semester'] ?? null,
];
}
}