Remove make dir for Storage::

This commit is contained in:
David Bomba 2022-10-22 08:19:35 +11:00
parent ab71be42a0
commit 2f4e129cf0
5 changed files with 12 additions and 10 deletions

View File

@ -213,9 +213,9 @@ class CreateEntityPdf implements ShouldQueue
if ($pdf) {
try {
if (! Storage::disk($this->disk)->exists($path)) {
Storage::disk($this->disk)->makeDirectory($path, 0775);
}
// if (! Storage::disk($this->disk)->exists($path)) {
// Storage::disk($this->disk)->makeDirectory($path, 0775);
// }
Storage::disk($this->disk)->put($file_path, $pdf, 'public');
} catch (\Exception $e) {

View File

@ -100,8 +100,8 @@ class CreatePurchaseOrderPdf implements ShouldQueue
try{
if(!Storage::disk($this->disk)->exists($this->path))
Storage::disk($this->disk)->makeDirectory($this->path, 0775);
// if(!Storage::disk($this->disk)->exists($this->path))
// Storage::disk($this->disk)->makeDirectory($this->path, 0775);
Storage::disk($this->disk)->put($this->file_path, $pdf, 'public');

View File

@ -36,7 +36,7 @@ class Backup extends BaseModel
$filename = now()->format('Y_m_d').'_'.md5(time()).'.html';
$file_path = $path.$filename;
Storage::disk(config('filesystems.default'))->makeDirectory($path, 0775);
// Storage::disk(config('filesystems.default'))->makeDirectory($path, 0775);
Storage::disk(config('filesystems.default'))->put($file_path, $html);

View File

@ -82,7 +82,8 @@ class ActivityRepository extends BaseRepository
$backup = new Backup();
$entity->load('client');
$contact = $entity->client->primary_contact()->first();
$backup->html_backup = $this->generateHtml($entity);
$backup->html_backup = '';
// $backup->html_backup = $this->generateHtml($entity);
$backup->amount = $entity->amount;
$backup->activity_id = $activity->id;
$backup->json_backup = '';

View File

@ -105,9 +105,10 @@ class GenerateDeliveryNote
info($maker->getCompiledHTML());
}
if (! Storage::disk($this->disk)->exists($this->invoice->client->invoice_filepath($invitation))) {
Storage::disk($this->disk)->makeDirectory($this->invoice->client->invoice_filepath($invitation), 0775);
}
// if (! Storage::disk($this->disk)->exists($this->invoice->client->invoice_filepath($invitation))) {
// Storage::disk($this->disk)->makeDirectory($this->invoice->client->invoice_filepath($invitation), 0775);
// }
Storage::disk($this->disk)->put($file_path, $pdf, 'public');
return $file_path;