コード例 #1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int $id
  * @return Response
  */
 public function destroy($id)
 {
     $flyer = Flyer::whereId($id)->first();
     //Delete the pics
     if (!$this->deleteImages($flyer->id)) {
         flash()->error('Error', 'ERROR deleting the photos!');
         return back();
     }
     $flyer->forceDelete($id);
     flash()->success('Deleted', 'The Flayer has been deleted');
     return back();
 }