/**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $user = Auth::user();
     $staff = Teacher::all();
     $classList = Classe::lists('name', 'id');
     $subjectList = Subject::lists('name', 'id');
     $subjectAssigned = SubjectAssigned::all();
     return view('Admin.subjectAssigned.index', compact('subjectList', 'classList', 'staff', 'user', 'assignedClass', 'subjectAssigned'));
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $user = \Auth::user();
     $classList = Classe::lists('name', 'name');
     $subjects = Subject::lists('name', 'id');
     $student = Student::findOrFail($id);
     $str = [];
     foreach ($student->subjects as $st) {
         $str[] = $st->pivot->subject_id;
     }
     return view('admin.students.edit', compact('student', 'classList', 'subjects', 'str', 'user'));
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $subjectList = Subject::lists('name', 'id');
     $classList = Classe::lists('name');
     $teacher_id = 1;
     $question = Question::find($id);
     return view('admin.questions.edit', compact('question', 'subjectList', 'teacher_id', 'classList'));
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $user = \Auth::user();
     $types = ['' => 'Selete Type', 'Administrator' => 'Administrator', 'Teacher' => 'Teacher', 'Users' => 'Users', 'Principal' => 'Principal', 'Secretary' => 'Secretary'];
     $classes = Classe::lists('name', 'id');
     $subjects = Subject::lists('name', 'id');
     $teacher = Teacher::findOrFail($id);
     return view('admin.teachers.edit', compact('teacher', 'types', 'classes', 'subjects', 'user'));
 }