main
Ilham Wara Nugroho 2026-03-04 14:01:21 +07:00
parent a21ff922d7
commit f1d94640ba
1 changed files with 2 additions and 3 deletions

View File

@ -156,15 +156,14 @@ class HomeController extends Controller
if(session('kabupaten_id') != ''){ if(session('kabupaten_id') != ''){
$usulan = Kuesioner::whereHas('sekolah',function($query){ $usulan = Kuesioner::whereHas('sekolah',function($query){
$query->where('ms_kabupaten_id',session('kabupaten_id')); $query->where('ms_kabupaten_id',session('kabupaten_id'));
})->where('tahun',date('Y'))->get(); })->where('tahun',date('Y'))->orderBy('KuesionerId','DESC')->limit(5)->get();
}else{ }else{
$usulan = Kuesioner::where('tahun',date('Y'))->get(); $usulan = Kuesioner::where('tahun',date('Y'))->orderBy('KuesionerId','DESC')->limit(5)->get();
} }
$_data = []; $_data = [];
foreach ($usulan as $key => $row) { foreach ($usulan as $key => $row) {
$action = ''; $action = '';
$sekolah = ''; $sekolah = '';
$sekolah .= @$row->sekolah->nama_sekolah.' '; $sekolah .= @$row->sekolah->nama_sekolah.' ';