reconstruction of the project
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources\Attendance;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class TeacherAttendanceFormResource extends JsonResource
|
||||
{
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
return [
|
||||
'teacher_name' => $this['teacher_name'] ?? null,
|
||||
'students' => $this['students'] ?? [],
|
||||
'teachers' => $this['teachers'] ?? [],
|
||||
'class_section_id' => $this['class_section_id'] ?? null,
|
||||
'sunday_dates' => $this['sunday_dates'] ?? [],
|
||||
'current_sunday' => $this['current_sunday'] ?? null,
|
||||
'enable_attendance' => $this['enable_attendance'] ?? null,
|
||||
'can_edit' => (bool)($this['can_edit'] ?? false),
|
||||
'class_id' => $this['class_id'] ?? null,
|
||||
'no_school_days' => $this['no_school_days'] ?? [],
|
||||
'today' => $this['today'] ?? null,
|
||||
'locked_by_student' => $this['locked_by_student'] ?? [],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user