Пример #1
0
 public function getstudentsexamschedule()
 {
     # code... student exam schedule saif
     $stdInof = Students::where('institute_code', '=', Auth::user()->institute_id)->where('st_id', '=', Auth::user()->uid)->first();
     $clsId = $stdInof->class;
     $examschedule = ExamSchedule::where('class_id', '=', $clsId)->get();
     return View('student.examSchedule')->with('examschedule', $examschedule);
 }
Пример #2
0
 public function postRoutineByClass()
 {
     //Moin
     //Exam routine search Function for admin
     //return 1;
     $class = Input::get('class');
     //return $class;
     if ($class != '') {
         $examname = Exam::where('institute_code', '=', Auth::user()->institute_id)->lists('exam_id', 'exam_name');
         $classname = ClassAdd::where('institute_code', '=', Auth::user()->institute_id)->lists('class_id', 'class_name');
         $schedule = ExamSchedule::where('institute_code', '=', Auth::user()->institute_id)->get();
         $teacher = Teacher::where('institute_code', '=', Auth::user()->institute_id)->get();
         $sid = ClassRoutine::where('class_name', 'LIKE', $class)->pluck('institute_code');
         $sat = ClassRoutine::where('class_name', '=', $class)->where('institute_code', '=', $sid)->where('day', '=', 'SATURDAY')->get();
         $sun = ClassRoutine::where('class_name', '=', $class)->where('institute_code', '=', $sid)->where('day', '=', 'SUNDAY')->get();
         $mon = ClassRoutine::where('class_name', '=', $class)->where('institute_code', '=', $sid)->where('day', '=', 'MONDAY')->get();
         $tue = ClassRoutine::where('class_name', '=', $class)->where('institute_code', '=', $sid)->where('day', '=', 'TUESDAY')->get();
         $wed = ClassRoutine::where('class_name', '=', $class)->where('institute_code', '=', $sid)->where('day', '=', 'WEDNESDAY')->get();
         $thu = ClassRoutine::where('class_name', '=', $class)->where('institute_code', '=', $sid)->where('day', '=', 'THURSDAY')->get();
         $fri = ClassRoutine::where('class_name', '=', $class)->where('institute_code', '=', $sid)->where('day', '=', 'FRIDAY')->get();
         $search1 = Section::where('class_name', '=', $class)->where('institute_code', '=', $sid)->orderBy('section_name', 'ASC')->lists('section_category', 'section_name');
         $indsec = ClassRoutine::where('class_name', '=', $class)->where('institute_code', '=', $sid)->get();
         //return $indsec;
         return view('admin.addroutine', ['examview' => $examname, 'classview' => $classname, 'examschedule' => $schedule, 'sat' => $sat, 'sun' => $sun, 'mon' => $mon, 'tue' => $tue, 'wed' => $wed, 'thu' => $thu, 'fri' => $fri, 'sec' => $indsec, 'section' => $search1, 'teacher' => $teacher]);
     }
 }