Holen Sie sich die Kurse vom Studenten:
$student = Student::where('user_id', auth()->id())->first();
$courses = $student->courses()->orderByDesc('course_student.created_at')->get();
Holen Sie sich die Kurse vom Studenten:
$student = Student::where('user_id', auth()->id())->first();
$courses = $student->courses()->orderByDesc('course_student.created_at')->get();