public function updateHoraire(Request $request) { $horaire = Horaire::find($request->input('id')); $horaire->h_debut = $request->input('h_debut'); $horaire->h_fin = $request->input('h_fin'); $horaire->date = date_create($request->input('date')); $horaire->matiere_id = $request->input('matiere_id'); $horaire->save(); return Redirect('/app/cours'); }
public function editer($id) { $horaire = Horaire::find($id); $absents = Horaire::absents($id); return View('app/noter_absences', ['horaire' => $horaire, 'absents' => $absents, 'etudiants' => $horaire->matiere->promo->etudiants]); }