Ejemplo n.º 1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     //need to put in a control to double check before deletion
     Community::findOrFail($id)->delete();
     //find or fail used in 2 steps to obtain b4 deletion.
     Session::flash('message', 'Community deleted!');
     Session::flash('alert-class', 'alert-danger');
     return Redirect::route('community.index');
 }