Files
alrahma_sunday_school_api/app/Http/Resources/TeacherSubmissionRowResource.php
T
2026-06-09 01:03:53 -04:00

27 lines
962 B
PHP

<?php
namespace App\Http\Resources\Admin;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class TeacherSubmissionRowResource extends JsonResource
{
public function toArray(Request $request): array
{
return [
'class_section' => $this['class_section'] ?? null,
'class_section_id' => $this['class_section_id'] ?? null,
'teachers' => $this['teachers'] ?? [],
'student_count' => $this['student_count'] ?? 0,
'midterm_score_status' => $this['midterm_score_status'] ?? null,
'midterm_comment_status' => $this['midterm_comment_status'] ?? null,
'participation_status' => $this['participation_status'] ?? null,
'ptap_comment_status' => $this['ptap_comment_status'] ?? null,
'attendance_status' => $this['attendance_status'] ?? null,
'missing_items' => $this['missing_items'] ?? [],
];
}
}