destroy() 공개 메소드

public destroy ( $id )
예제 #1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  Illuminate\Http\Request $request
  * @param  int  $id
  * @return Response
  */
 public function destroy(Request $request, $id)
 {
     $this->comment_gestion->destroy($id);
     if ($request->ajax()) {
         return response()->json(['id' => $id]);
     }
     return redirect('comment');
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     $this->comment->destroy($id);
     return back()->with('ok', 'Delete comment successfully');
 }
예제 #3
0
 /**
  * 删除
  *
  * @param ineger $id
  */
 public function getDestroy($id)
 {
     $this->commentRepository->destroy($id);
     return responseSuccess('删除成功');
 }