Skip to content

Commit

Permalink
update student count
Browse files Browse the repository at this point in the history
  • Loading branch information
farahamaliaa committed Jan 9, 2025
1 parent 5466bf0 commit 142bbca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions app/Http/Controllers/Schools/StudentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ class StudentController extends Controller
private ClassroomInterface $classroom;

public function __construct(
UserInterface $user, StudentInterface $student, StudentService $service,
ReligionInterface $religion, ClassroomStudentInterface $classroomStudent,
ClassroomStudentService $classroomService, ModelHasRfidInterface $modelHasRfid,
UserInterface $user, StudentInterface $student, StudentService $service,
ReligionInterface $religion, ClassroomStudentInterface $classroomStudent,
ClassroomStudentService $classroomService, ModelHasRfidInterface $modelHasRfid,
SchoolYearInterface $schoolYear, ClassroomInterface $classroom)
{
$this->user = $user;
Expand All @@ -64,8 +64,9 @@ public function index(Request $request)
$alumnus = $this->classroomStudent->getAlumnus($request);
$religions = $this->religion->get();
$classrooms = $this->classroom->get();
$studentCount = $this->student->get()->count();

return view('school.pages.student.index', compact('students', 'religions', 'alumnus', 'classrooms'));
return view('school.pages.student.index', compact('students', 'religions', 'alumnus', 'classrooms', 'studentCount'));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion resources/views/school/pages/student/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class="img-fluid mb-n4">
</div>
<div class="ms-4">
<h4 class="card-title text-dark"><b>Jumlah Siswa</b></h4>
<h6 style="font-size: 25px; color: #13DEB9"><b>{{ $students->count() }}</b></h6>
<h6 style="font-size: 25px; color: #13DEB9"><b>{{ $studentCount }}</b></h6>
</div>
</div>
</div>
Expand Down

0 comments on commit 142bbca

Please sign in to comment.