public function index() { if (Auth::check() && Auth::user()->id_karyawan == '1') { $absen = Absen::all(); $laporan = Laporan::all(); $shift = Shift::all(); return view('admin/index')->with("absen", $absen)->with("laporan", $laporan)->with("shift", $shift); } else { return view('errors/403'); } }
/** * Menampilkan data pengumuman. * * @return integer */ public function index() { if (Auth::check() && Auth::user()->id_karyawan == '1') { $absen = Absen::all(); $laporan = Laporan::all(); $shift = Shift::all(); $notice = Notice::orderBy("id_notice", "DESC")->paginate(10); $divisi = Karyawan::divisi(); return view('admin/pengumuman/pengumuman')->with("absen", $absen)->with("laporan", $laporan)->with("shift", $shift)->with("divisi", $divisi)->with("notice", $notice); } else { return view('errors/403'); } }