/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index($jenjang) { if ($jenjang == 'sd') { $sd = Schools::all()->where('jenjang', 'SD'); $min = Schools::all()->where('jenjang', 'MIN'); $data = array('tipe1' => $sd, 'tipe2' => $min); } elseif ($jenjang == 'smp') { $smp = Schools::all()->where('jenjang', 'SMP'); $mts = Schools::all()->where('jenjang', 'MTS'); $data = array('tipe1' => $smp, 'tipe2' => $mts); } elseif ($jenjang == 'sma') { $sma = Schools::all()->where('jenjang', 'SMA'); $smk = Schools::all()->where('jenjang', 'SMK'); $data = array('tipe1' => $sma, 'tipe2' => $smk); } else { return view('errors.404'); } return view('pages.sekolah', $data); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $schools = Schools::all(); return view('School.index', compact('schools')); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $departments = Departments::all(); $schools = Schools::all(); return view('Department.index', compact('departments', 'schools')); }