public function postFileDestroy(Request $request) { $documentoP = DocumentoAdjunto::findOrFail($request->get('key')); \Storage::delete($documentoP->path); $documentoP->delete(); return response()->json(['message' => 'El documento se ha eliminado exitosamente.']); }
public function getDestroyImg(Request $request) { $documentoP = DocumentoAdjunto::findOrFail($request->get('id')); \Storage::delete($documentoP->path); $documentoP->delete(); }