diff --git a/app/Http/Controllers/Students/DashboardController.php b/app/Http/Controllers/Students/DashboardController.php index f79adf0..8b457b0 100644 --- a/app/Http/Controllers/Students/DashboardController.php +++ b/app/Http/Controllers/Students/DashboardController.php @@ -16,8 +16,8 @@ public function index() $student_info = Student::find(currentUserId()); $enrollment = Enrollment::where('student_id', currentUserId())->get(); $course = Course::get(); - $checkout = Checkout::get(); + $checkout = Checkout::where('student_id', currentUserId())->get(); // $purchaseHistory = Enrollment::with(['course', 'checkout'])->orderBy('enrollment_date', 'desc')->get(); - return view('students.dashboard', compact('student_info','enrollment', 'course')); + return view('students.dashboard', compact('student_info','enrollment', 'course','checkout')); } } diff --git a/resources/views/frontend/watchCourse.blade.php b/resources/views/frontend/watchCourse.blade.php index 1832ca3..f18484f 100644 --- a/resources/views/frontend/watchCourse.blade.php +++ b/resources/views/frontend/watchCourse.blade.php @@ -70,9 +70,9 @@