Beispiel #1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $miembro = Miembro::findOrFail($id);
     $destinationPath = 'uploads/images/';
     File::delete($destinationPath . $miembro->foto);
     if ($miembro::destroy($id)) {
         Session::flash('message', 'Eliminado Correctamente');
         Session::flash('class', 'success');
     } else {
         Session::flash('message', 'Error Al Eliminar');
         Session::flash('class', 'danger');
     }
     return Redirect::to('dashboard/miembros');
 }