Понял!Я нашел способ.
Krs::select(DB::raw('krs.*'))
->join(DB::raw('(SELECT kode_matakuliah, MAX(bobot) as bobot_max
FROM krs
WHERE nim = 133341043
GROUP BY kode_matakuliah) as b'),function($join){
$join->on('krs.kode_matakuliah', '=', 'b.kode_matakuliah')
->on('krs.bobot', '=', 'b.bobot_max');
})
->where('krs.no_bukti',1)
->where('krs.nim',133341043)->get();