/**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(Request $request, $id)
 {
     $marksheet = Marksheet::whereid($id)->firstOrfail();
     //$marksheet->trainee=$request->get('trainee');
     $marksheet->mark = $request->get('mark');
     $marksheet->save();
     return redirect('MarksheetAdmin/' . $marksheet->course_id . '/listTraineesForMarks')->with('status', 'updated successfully');
 }
 public function listOfstudentsAndMarks()
 {
     $marksheets = Marksheet::all();
     $exams = Exam::all();
     return view('marksheet/listOfstudentsAndMarks', compact('marksheets', 'exams'));
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     $marksheet = Marksheet::whereid($id)->firstOrfail();
     $marksheet->delete();
     return redirect('listOfstudentsAndMarks/' . $marksheet->course_id)->with('status', 'Deleted successfully');
 }