예제 #1
0
 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);
 }
예제 #2
0
 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);
 }
예제 #4
0
 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);
 }