diff --git a/app/Http/Controllers/Api/StafApiController.php b/app/Http/Controllers/Api/StafApiController.php index ad629b38..85e7c1c9 100644 --- a/app/Http/Controllers/Api/StafApiController.php +++ b/app/Http/Controllers/Api/StafApiController.php @@ -145,4 +145,9 @@ public function list_point_student(Request $request) $students = $this->student->getByApi($request); return response()->json(['status' => 'success', 'message' => "Berhasil mengambil data",'code' => 200, 'data' => StudentPointResource::collection($students),]); } + + public function popular_violations() + { + + } } diff --git a/app/Http/Resources/EmployeeJournalResource.php b/app/Http/Resources/EmployeeJournalResource.php index 9b532068..f8d2f1b2 100644 --- a/app/Http/Resources/EmployeeJournalResource.php +++ b/app/Http/Resources/EmployeeJournalResource.php @@ -16,6 +16,7 @@ class EmployeeJournalResource extends JsonResource public function toArray(Request $request): array { return [ + 'id' => $this->id, 'date' => Carbon::parse($this->created_at)->translatedFormat('d F Y'), 'title' => $this->title, 'description' => $this->description, diff --git a/routes/api.php b/routes/api.php index df4456f7..de6a5f33 100644 --- a/routes/api.php +++ b/routes/api.php @@ -88,6 +88,7 @@ Route::get('staf/list-point-student', [StafApiController::class, 'list_point_student']); + Route::get('lesson-schedule/{user}', [LessonScheduleApiController::class, 'index']); Route::get('teacher-journal/{lessonSchedule}', [LessonScheduleApiController::class, 'create']); Route::get('history-journal/{user}', [LessonScheduleApiController::class, 'history']);