public function edit(Request $request)
 {
     $universite = Universite::where('idUniv', $request->input('idUniv'))->get()->first();
     $universite->nomUniv = $request->input('nomUniv');
     $universite->adr1Univ = $request->input('adr1Univ');
     $universite->adr2Univ = $request->input('adr2Univ');
     $universite->telUniv = $request->input('telUniv');
     $universite->mailUniv = $request->input('mailUniv');
     $universite->photoUniv = $request->input('photoUniv');
     $universite->logoUniv = $request->input('logoUniv');
     $universite->latUniv = $request->input('latUniv');
     $universite->longUniv = $request->input('longUniv');
     $universite->inseeVille = $request->input('inseeVille');
     $universite->save();
     return redirect()->route('backuniv');
 }
 /**
  * Retourne une liste des 10 premiers sites universitaires
  * et les 10 premières villes complétant les premiers caractères d'une recherche 
  */
 public function ville(Request $request, $univ = null)
 {
     $term = Str::lower(Input::get('term'));
     $jsonArr = array();
     // Récupérer l'identifiant de l'université
     if ($univ != null) {
         $univ2 = Universite::where('nomUniv', $univ)->get();
         $sites = DB::table("site")->distinct('nomSite')->where('nomsite', 'like', $term . '%')->where('idUniv', $univ2[0]->idUniv)->groupBy('nomSite')->take(10)->get();
         foreach ($sites as $value) {
             $jsonArr[] = array('value' => $value->nomSite);
         }
     }
     if ($term != null) {
         $villes = DB::table("ville")->distinct('nomVille')->where('nomVille', 'like', $term . '%')->take(10)->get();
         foreach ($villes as $value) {
             $jsonArr[] = array('value' => $value->nomVille);
         }
     }
     return Response::json($jsonArr);
 }