latest anggota
This commit is contained in:
parent
06f672b441
commit
4b82871a9f
|
|
@ -22,7 +22,9 @@ public function anggota()
|
||||||
// Filter data: Ambil anggota yang relasi 'role'-nya bernama 'Anggota'
|
// Filter data: Ambil anggota yang relasi 'role'-nya bernama 'Anggota'
|
||||||
$data_anggota = Anggota::whereHas('role', function($query) {
|
$data_anggota = Anggota::whereHas('role', function($query) {
|
||||||
$query->where('nama_role', 'Anggota');
|
$query->where('nama_role', 'Anggota');
|
||||||
})->with(['kolat', 'role'])->get();
|
})->with(['kolat', 'role'])
|
||||||
|
->latest()
|
||||||
|
->get();
|
||||||
|
|
||||||
return view('anggota.anggota', compact('data_anggota'));
|
return view('anggota.anggota', compact('data_anggota'));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue