コード例 #1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy(Request $request, $id)
 {
     $new_enrollee = NewEnrollee::findOrFail($id);
     $report_id = $new_enrollee->report_date->id;
     $new_enrollee->delete();
     $request->session()->flash('alert-success', 'Deletion was successful!');
     return redirect('trainees-new-enrollees/' . $report_id);
 }