コード例 #1
0
 /**
  * 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'));
 }
コード例 #2
0
 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'));
 }
コード例 #3
0
 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'));
 }
コード例 #4
0
 public function create()
 {
     $teachers = Teacher::pluck('name', 'id')->toArray();
     $subjects = Subject::isCurrent()->pluck('name', 'id')->toArray();
     return view('teachers::messages.create', compact('subjects', 'teachers'));
 }