Skip to content

Commit

Permalink
Update TeacherApiController.php
Browse files Browse the repository at this point in the history
  • Loading branch information
ArdianS18 committed Nov 20, 2024
1 parent b2b229c commit 9fa82fa
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions app/Http/Controllers/Api/TeacherApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,7 @@ public function teacher_attendance(User $user)
$history_attendance = $this->attendance->whereUser($employee->id, 'App\Models\Employee');

return response()->json(['status' => 'success', 'message' => "Berhasil mengambil data",'code' => 200,
// 'attendance_today' => [
// 'day' => $todayAttendance->created_at == null ? '-' : Carbon::parse($todayAttendance->created_at)->translatedFormat('l'),
// 'date' => $todayAttendance->created_at == null ? '-' : Carbon::parse($todayAttendance->created_at)->translatedFormat('d'),
// 'month' => $todayAttendance->created_at == null ? '-' : Carbon::parse($todayAttendance->created_at)->translatedFormat('M'),
// 'date_complate' => $todayAttendance->created_at == null ? '-' : Carbon::parse($todayAttendance->created_at)->translatedFormat('l, j F Y'),
// 'check_in' => $todayAttendance->checkin == null ? '-' : \Carbon\Carbon::parse($todayAttendance->checkin)->format('H:i'),
// 'check_out' => $todayAttendance->checkout == null ? '-' : \Carbon\Carbon::parse($todayAttendance->checkout)->format('H:i'),
// 'status' => $todayAttendance->status == null ? '-' : $todayAttendance->status->label(),
// ],
'attendance_today' => HistoryAttendanceResource::collection($todayAttendance),
'attendance_history' => HistoryAttendanceResource::collection($history_attendance),
]);
}
Expand Down

0 comments on commit 9fa82fa

Please sign in to comment.