Commit 5210cdff by Farendi Giotivano R.P

kelompok by periode

parent 29485ae8
......@@ -34,7 +34,9 @@ class KelompokController extends Controller
$kelompok = Kelompok::with(['rAnggota'])
->where('nidn_dosen', $bio->noidentitas)
->where('kirim', '1')
->whereYear('created_at', $year)
->whereHas('rPeriode', function ($query) use ($year) {
$query->where('nama', $year);
})
->orderBy('kode')
->get();
......
......@@ -37,7 +37,9 @@ class KelompokController extends Controller
->whereHas('rAnggota', function ($query) use($nim){
$query->where('nim', $nim);
})
->whereYear('created_at', $year)
->whereHas('rPeriode', function ($query) use ($year) {
$query->where('nama', $year);
})
->orderBy('kode')
->get();
......@@ -220,6 +222,22 @@ class KelompokController extends Controller
return redirect()->route('mahasiswa.kelompok.index');
}
public function hapusanggota(Request $request)
{
$kel = $request->except('_token');
$get = explode('_', decrypt($kel['id']));
$dataid = $get[0];
$kelId = $get[1];
$kelompok = KelompokDetail::query()->find($dataid);
$kelompok->delete();
return redirect()->route('mahasiswa.kelompok.createnew', ['id' => encrypt($kelId)])->with('success', 'Berhasil dihapus');
}
// public function cetak_kelompok(Request $request)
// {
// $fakultas = $request->fakultas;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment