vitareinforce

fungsi ambil jadwal karyawan group by id

Jan 20th, 2021 (edited)
910
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.    public function getJadwalKaryawan($id) {
  2.         $jadwal_masuk = JadwalHariKerja::where('karyawan_id', '=', $id)->get()->toArray();
  3.         $jadwal_izin = JadwalIzin::where('karyawan_id', '=', $id)->get()->toArray();
  4.         $jadwal_libur = JadwalLibur::where('karyawan_id', '=', $id)->get()->toArray();
  5.         $jadwal_ngeplus = JadwalNgeplus::where('karyawan_id', '=', $id)->get()->toArray();
  6.         $result = array(
  7.             'jadwal_masuk' => $jadwal_masuk,
  8.             'jadwal_izin' => $jadwal_izin,
  9.             'jadwal_libur' => $jadwal_libur,
  10.             'jadwal_ngeplus' => $jadwal_ngeplus
  11.         );
  12.         return $result;
  13.     }
  14.  
  15.     public function getJadwalGroup($id) {
  16.         $jadwal_masuk = JadwalHariKerja::where('group_id', '=', $id)->get()->toArray();
  17.         $jadwal_izin = JadwalIzin::where('group_id', '=', $id)->get()->toArray();
  18.         $jadwal_libur = JadwalLibur::where('group_id', '=', $id)->get()->toArray();
  19.         $jadwal_ngeplus = JadwalNgeplus::where('group_id', '=', $id)->get()->toArray();
  20.         $result = array(
  21.             'jadwal_masuk' => $jadwal_masuk,
  22.             'jadwal_izin' => $jadwal_izin,
  23.             'jadwal_libur' => $jadwal_libur,
  24.             'jadwal_ngeplus' => $jadwal_ngeplus
  25.         );
  26.         return $result;
  27.     }
RAW Paste Data