/** * Show the form for creating a new resource. * @return Response */ public function create() { $classrooms = Classroom::inCurrentSemester()->pluck('code', 'id')->toArray(); $subjects = Subject::isCurrent()->pluck('name', 'id')->toArray(); $years = Year::leftJoin('academystructure_terms as acaterm', 'acaterm.year_id', '=', 'ay.id')->leftJoin('academystructure_departments as acadep', 'acadep.term_id', '=', 'acaterm.id')->Leftjoin('students as s', 's.academystructure_department_id', '=', 'acadep.id')->groupBy('ay.id')->from('academystructure_years as ay')->havingRaw('COUNT(s.id)>0')->pluck('ay.name', 'ay.id')->toArray(); return view('exams::Extend.create', compact('years', 'subjects', 'classrooms')); }
public function create() { $classrooms = Classroom::inCurrentSemester()->pluck('code', 'id')->toArray(); $subjects = Subject::isCurrent()->lists('name', 'id')->toArray(); $intervals = ClassroomInterval::inCurrentSemester()->pluck('title', 'id')->toArray(); $teachers = Teacher::isActive()->pluck('name', 'id')->toArray(); return view('classrooms::sessions.create', compact('classrooms', 'subjects', 'teachers', 'intervals')); }
public function edit($id, Classroom $Classroom) { $classroom = $Classroom->inCurrentSemester()->with('teacher', 'subject', 'subject.teachers')->findOrFail($id); $genders = $this->genders; $days = $this->days; $teachers = $classroom->subject->teachers->pluck('name', 'id')->toArray(); $subjects = [NULL => NULL] + Subject::isCurrent()->pluck('name', 'id')->toArray(); return view("classrooms::classrooms.edit", compact('genders', 'subjects', 'days', 'classroom', 'teachers')); }
public function create() { $teachers = Teacher::pluck('name', 'id')->toArray(); $subjects = Subject::isCurrent()->pluck('name', 'id')->toArray(); return view('teachers::messages.create', compact('subjects', 'teachers')); }