コード例 #1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $comment = DpComment::findOrFail($id);
     $comment->delete();
     return redirect('DP/calendar');
 }
コード例 #2
0
ファイル: DpController.php プロジェクト: nkampa/cea_monitor
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function restore(Request $request, $id)
 {
     $reading = Dp::withTrashed()->where('id', $id)->restore();
     DpComment::create($request->all());
     return redirect('DP/calendar');
 }