Files
alrahma_sunday_school_api/app/Http/Resources/Grading/BelowSixtyStudentResource.php
T
2026-03-09 02:52:13 -04:00

32 lines
1.4 KiB
PHP

<?php
namespace App\Http\Resources\Grading;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class BelowSixtyStudentResource extends JsonResource
{
public function toArray(Request $request): array
{
return [
'student_id' => (int) ($this->resource['student_id'] ?? 0),
'school_id' => $this->resource['school_id'] ?? null,
'firstname' => $this->resource['firstname'] ?? null,
'lastname' => $this->resource['lastname'] ?? null,
'class_section_name' => $this->resource['class_section_name'] ?? null,
'homework_avg' => $this->resource['homework_avg'] ?? null,
'project_avg' => $this->resource['project_avg'] ?? null,
'participation_score' => $this->resource['participation_score'] ?? null,
'test_avg' => $this->resource['test_avg'] ?? null,
'ptap_score' => $this->resource['ptap_score'] ?? null,
'attendance_score' => $this->resource['attendance_score'] ?? null,
'midterm_exam_score' => $this->resource['midterm_exam_score'] ?? null,
'final_exam_score' => $this->resource['final_exam_score'] ?? null,
'semester_score' => $this->resource['semester_score'] ?? null,
'comment' => $this->resource['comment'] ?? null,
'status' => $this->resource['status'] ?? null,
];
}
}