Try this:
Student::with(array('exam' => function($query) {
$query->orderBy('result', 'DESC');
}))
->get();
Try this:
Student::with(array('exam' => function($query) {
$query->orderBy('result', 'DESC');
}))
->get();