solve jumlah lahan dan tanaman

This commit is contained in:
2026-09-23 17:01:19 +07:00
parent be4d46004e
commit 7fdf9b400d
@@ -111,6 +111,7 @@ class PetaniController extends Controller
? DesaKelurahan::select('id', 'nama')->where('kecamatan_id', $request->kecamatan_id)->orderBy('nama')->get()
: collect();
$lahanSummaryQuery = Lahan::query()
->whereHas('petani')
->when($request->filled('komoditas_id'), function ($query) use ($request) {
$query->where('komoditas_id', $request->komoditas_id);
})