示例#1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     //
     $nerd = Nerd::findOrFail($id);
     $nerd->delete();
     Session::flash('flash_message', 'Nerd successfully deleted!');
     return redirect()->route('nerds.index');
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     // delete
     $nerd = Nerd::find($id);
     $nerd->delete();
     // redirect
     Session::flash('message', 'Successfully deleted the nerd!');
     return redirect('nerds');
 }