diff --git a/app/Contracts/Repositories/StudentRepository.php b/app/Contracts/Repositories/StudentRepository.php index eddc7186..f4a8ad0a 100644 --- a/app/Contracts/Repositories/StudentRepository.php +++ b/app/Contracts/Repositories/StudentRepository.php @@ -46,4 +46,9 @@ public function whereSchool(mixed $id): mixed { return $this->model->query()->where('school_id', $id)->latest()->paginate(10); } + + public function doesntHaveClassroom(): mixed + { + return $this->model-> + } } diff --git a/app/Http/Controllers/ClassroomController.php b/app/Http/Controllers/ClassroomController.php index 433471ff..45ff7d7c 100644 --- a/app/Http/Controllers/ClassroomController.php +++ b/app/Http/Controllers/ClassroomController.php @@ -65,7 +65,8 @@ public function store(StoreClassroomRequest $request) */ public function show(Classroom $classroom) { - return view('school.pages.class.detail-class', compact('classroom ')); + $schoolYears = $this->schoolYear->whereSchool(auth()->user()->school->id); + return view('school.pages.class.detail-class', compact('classroom', 'schoolYears')); } /** diff --git a/app/Models/Classroom.php b/app/Models/Classroom.php index 9a481354..a47e2dc0 100644 --- a/app/Models/Classroom.php +++ b/app/Models/Classroom.php @@ -19,4 +19,7 @@ class Classroom extends Model 'school_year_id', 'level_class_id' ]; + + public $incrementing = false; + public $keyType = 'char'; } diff --git a/resources/views/school/pages/class/detail-class.blade.php b/resources/views/school/pages/class/detail-class.blade.php index 9560cfde..380b6342 100644 --- a/resources/views/school/pages/class/detail-class.blade.php +++ b/resources/views/school/pages/class/detail-class.blade.php @@ -5,7 +5,11 @@
Pilih siswa di sebelah kiri untuk memasukkan siswa ke dalam Kelas