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 a57bb25 commit e5df8a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Api/TeacherApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +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,
'date_complate' => $todayAttendance->created_at == null ? '-' : Carbon::parse($todayAttendance->created_at)->translatedFormat('l, j F Y'),
'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(),
Expand Down

0 comments on commit e5df8a3

Please sign in to comment.