/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function delete($attachment_code = '') { if ($attachment_code) { $attachment = new Attachment(); $attachment->deleteAttachment($attachment_code); return Redirect::back()->withErrors(['Attachment deleted.']); } else { return Redirect::back()->withErrors(['Attachment code not indicated.']); } }