public function apiPengumuman() { if ($this->auth->user()->status == 'guru') { $penulis = $this->auth->user()->nama_pegawai; $data = Pengumuman::orderBy('tanggal', 'desc')->where('penulis', $penulis)->get(); } else { $data = Pengumuman::orderBy('tanggal', 'desc')->get(); } return response()->json($data); }
public function pengumumanlist() { $this->data['title'] = 'Pengumuman'; $this->data['pengumumanlist'] = Models\Pengumuman::orderBy('tanggal', 'desc')->paginate(5); return view('front.pengumumanlist', $this->data); }
public function apiPengumuman() { $data = Pengumuman::orderBy('tanggal', 'desc')->get(); return response()->json($data); }
public function pengumumanlist() { $this->data['title'] = 'Daftar Informasi Penting'; $this->data['pengumumanlist'] = Models\Pengumuman::orderBy('tanggal', 'desc')->paginate(5); return view('bappeda.informasi', $this->data); }