Explicitly use document disk path

This commit is contained in:
David Bomba 2025-08-16 16:30:51 +10:00
parent 9929ea18d5
commit 3883fb6d3c
2 changed files with 7 additions and 2 deletions

View File

@ -329,7 +329,7 @@ class ClientController extends BaseController
//delete all documents
$client->documents->each(function ($document) {
try {
Storage::disk(config('filesystems.default'))->delete($document->url);
Storage::disk($document->disk)->delete($document->url);
} catch (\Exception $e) {
nlog($e->getMessage());
}

View File

@ -927,6 +927,11 @@ class Client extends BaseModel implements HasLocalePreference
return $this->company->company_key.'/';
}
/**
* document_filepath
* @deprecated. not used.
* @return string
*/
public function document_filepath(): string
{
return $this->company->company_key.'/documents/';