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 //delete all documents
$client->documents->each(function ($document) { $client->documents->each(function ($document) {
try { try {
Storage::disk(config('filesystems.default'))->delete($document->url); Storage::disk($document->disk)->delete($document->url);
} catch (\Exception $e) { } catch (\Exception $e) {
nlog($e->getMessage()); nlog($e->getMessage());
} }

View File

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