/**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $matieres = Matiere::all();
     $profs = Enseignant::activeEnseignants();
     $promos = Promo::activePromos();
     $modules = Module::all();
     return View('app/gestion_matieres', ['matieres' => $matieres, 'profs' => $profs, 'promos' => $promos, 'modules' => $modules]);
 }
示例#2
0
 public function postLogin(Request $r)
 {
     $user = Admin::attempt($r->input('email'), $r->input('password'));
     if ($user == null) {
         $user = Enseignant::attempt($r->input('email'), $r->input('password'));
         if ($user != null) {
             $filiere = Enseignant::isChef($user->id);
             if ($filiere != null) {
                 Session::put('user', $user);
                 return redirect('/app/cheffiliere');
             }
         }
     }
     if ($user == null) {
         $user = Etudiant::attempt($r->input('email'), $r->input('password'));
     }
     if ($user != null) {
         Session::put('user', $user);
         return redirect('/app');
     } else {
         return redirect('/');
     }
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $ens = Enseignant::find($id);
     $ens->state = 1;
     $ens->save();
     //$ens->delete();
     return redirect('/app/enseignants');
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $liste_resc = Enseignant::getReclamations(Session::get('user')->id);
     return View('app/gestion_reclamations', ['reclamations' => $liste_resc]);
 }
 public function showhoraire($id)
 {
     $etudiants_count = Etudiant::count();
     $enseignants_count = Enseignant::count();
     $absences_count = Absence::count();
     $matieres_count = Matiere::count();
     $etudiants = Etudiant::etudiants_plus_3_absences();
     $matiere = Matiere::find($id);
     $horaires = $matiere->horaires;
     return View('app/statistiques_horaire', ['etudiants_count' => $etudiants_count, 'enseignants_count' => $enseignants_count, 'absences_count' => $absences_count, 'matieres_count' => $matieres_count, 'etudiants' => $etudiants, 'horaires' => $horaires]);
 }
 public function indexProf()
 {
     $modules = Module::modulesProf(Session::get('user')->id);
     $enseignants = Enseignant::all();
     return View('app/gestion_modules', ['modules' => $modules, 'enseignants' => $enseignants]);
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $filieres = Filiere::all();
     $enseignants = Enseignant::all();
     return View('app.gestion_filieres', ['filieres' => $filieres, 'enseignants' => $enseignants]);
 }
示例#8
0
 public static function activeEnseignants()
 {
     $liste = Enseignant::where('state', '=', 0)->get();
     return $liste;
 }
示例#9
0
 public function gestion_enseignants()
 {
     $profs = Enseignant::all();
     $administrators = Admin::all();
     return View('app/gestion_enseignants', array('profs' => $profs, 'administrators' => $administrators));
 }