Ejemplo n.º 1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy(Special $special)
 {
     $picture = $special->attachment;
     $special->delete();
     if ($picture) {
         if (file_exists($picture->path)) {
             unlink($picture->path);
         }
         $picture->delete();
     }
     return redirect()->route('admin.special.index');
 }