Ejemplo n.º 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');
 }
Ejemplo n.º 2
0
 public function saveCurriculum(Request $req)
 {
     $guid = Uuid::uuid();
     $curriculum = new Curriculum();
     $curriculum->curriculum_guid = $guid;
     $curriculum->course = $req->course;
     $curriculum->major = $req->major;
     $curriculum->effective_sy = $req->effective;
     $curriculum->years_taken = $req->years_taken;
     $curriculum->bor_res = $req->bor;
     $curriculum->save();
     return Base32::encode($guid);
 }
Ejemplo n.º 3
0
 public function getSubjectForPrereq($guid)
 {
     $subjects = Prospectus::where('curriculum', Base32::decode($guid))->orderBy('catalog_no')->get(array('catalog_no'));
     return $subjects;
 }