Singkat WhereIn

 avatar
user_4680403528
abap
3 years ago
917 B
5
Indexable
$pesertas = Peserta::whereIn('id_jadwal', $jadwal)->where('id_sub_bidang', $subklas->id)->select('id', 'is_rekom', 'id_kualifikasi', 'jenjang')->get();
$pst = $pesertas->count();
$pst_k = $pesertas->where('is_rekom', 1)->count();
$pst_bk = $pesertas->where('is_rekom', 2)->count();
$pst_a = $pesertas->where('id_kualifikasi', 1)->count();
$pst_t = $pesertas->where('id_kualifikasi', 2)->count();
$pst_o = $pesertas->where('id_kualifikasi', 3)->count();
$pst_9 = $pesertas->where('jenjang', 9)->count();
$pst_8 = $pesertas->where('jenjang', 8)->count();
$pst_7 = $pesertas->where('jenjang', 7)->count();
$pst_6 = $pesertas->where('jenjang', 6)->count();
$pst_5 = $pesertas->where('jenjang', 5)->count();
$pst_4 = $pesertas->where('jenjang', 4)->count();
$pst_3 = $pesertas->where('jenjang', 3)->count();
$pst_2 = $pesertas->where('jenjang', 2)->count();
$pst_1 = $pesertas->where('jenjang', 1)->count();
Editor is loading...