예제 #1
0
 public function prospectus($year, $guid)
 {
     $cur = Base32::decode($guid);
     $curriculum = Curriculum::with('getCourse', 'getMajor')->where('curriculum_guid', $cur)->get()->first();
     $subjects = Prospectus::with('getCatalog')->where('curriculum', $cur)->where('year', $year)->get();
     $semester = array('first' => Prospectus::with('getCatalog')->where('curriculum', $cur)->where('year', $year)->where('semester', 'first')->count(), 'second' => Prospectus::with('getCatalog')->where('curriculum', $cur)->where('year', $year)->where('semester', 'second')->count(), 'summer' => Prospectus::with('getCatalog')->where('curriculum', $cur)->where('year', $year)->where('semester', 'summer')->count());
     return view('admin.prospectus', compact('curriculum', 'subjects', 'year', 'semester'));
     //return compact('curriculum', 'subjects', 'year', 'semester');
 }
예제 #2
0
 public function getSubjectForPrereq($guid)
 {
     $subjects = Prospectus::where('curriculum', Base32::decode($guid))->orderBy('catalog_no')->get(array('catalog_no'));
     return $subjects;
 }