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 saveProspectus(CreateProspectusRequest $req)
 {
     $guid = Uuid::uuid();
     $prospectus = new Prospectus();
     $prospectus->prospectus_guid = $guid;
     $prospectus->catalog_no = $req->catalog_no;
     $prospectus->curriculum = $req->curriculum;
     $prospectus->year = $req->year;
     $prospectus->semester = $req->semester;
     $prospectus->type = $req->type;
     $prospectus->save();
     return Prospectus::with('getCatalog')->where('prospectus_guid', $guid)->get()->first();
 }
Ejemplo n.º 3
0
 public function getSubjectForPrereq($guid)
 {
     $subjects = Prospectus::where('curriculum', Base32::decode($guid))->orderBy('catalog_no')->get(array('catalog_no'));
     return $subjects;
 }