/**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update($id)
 {
     $input = Input::all();
     //TODO: ajouter des try catch.
     $texte = Systeme::findOrFail($id);
     $texte->nomEvenement = $input['texte'];
     if ($texte->save()) {
         return Redirect::action('SystemeController@index');
     } else {
         return Redirect::back()->withInput()->withErrors($texte->validationMessages());
     }
 }
 public function detail($banqueId = null)
 {
     if (is_null($banqueId)) {
         // display the hole banque
         return view('banque', ['banqueItems' => Banque::all(), 'contexteItems' => Contexte::all(), 'critereItems' => Critere::all(), 'domaineItems' => Domaine::all(), 'systemeItems' => Systeme::all(), 'competenceItems' => Competence::all(), 'enseignantList' => Enseignant::all()]);
     } else {
         // display specific banque
         $banque = $this->gestSession->getBanque($banqueId);
         $items = Item::join('TitreGItem', 'TitreGItem.id_TitreGItem', '=', 'Item.id_TitreGItem')->where('Item.id_Banque', '=', $banqueId)->join('Competence', 'Item.id_Competence', '=', 'Competence.id_Competence')->get();
         $auteurs = Banque_Enseignant::where('id_Banque', '=', $banqueId)->get();
         $files = File::where('id_Banque', '=', $banqueId)->get();
         return view("banqueDetail")->with("banque", $banque)->with("items", $items)->with("files", $files)->with("auteurs", $auteurs);
     }
 }
 public function getSysteme($systemeId)
 {
     return Systeme::find($systemeId);
 }
 /**
  * La page d'ouverture du site
  * 
  * @return Illuminate/Http/Response
  */
 public function index()
 {
     $titre = Systeme::first()->nomEvenement;
     return View::make('homePage', compact('titre'));
 }