diff --git a/app/Abstracts/Http/PaymentController.php b/app/Abstracts/Http/PaymentController.php index d903dbfa3..dba98547d 100644 --- a/app/Abstracts/Http/PaymentController.php +++ b/app/Abstracts/Http/PaymentController.php @@ -7,6 +7,7 @@ use App\Http\Requests\Portal\InvoicePayment as PaymentRequest; use App\Models\Document\Document; use Illuminate\Routing\Controller as BaseController; use Illuminate\Support\Facades\URL; +use Illuminate\Support\Facades\Storage; use Monolog\Logger; use Monolog\Handler\StreamHandler; @@ -161,7 +162,7 @@ abstract class PaymentController extends BaseController public function getLogger() { $log = new Logger($this->alias); - $log->pushHandler(new StreamHandler(storage_path('logs/' . $this->alias . '.log')), Logger::INFO); + $log->pushHandler(new StreamHandler(Storage::path('logs/' . $this->alias . '.log')), Logger::INFO); return $log; } diff --git a/app/Console/Commands/StorageTempClear.php b/app/Console/Commands/StorageTempClear.php index 01d7dd8a9..3e4db1dfb 100644 --- a/app/Console/Commands/StorageTempClear.php +++ b/app/Console/Commands/StorageTempClear.php @@ -4,6 +4,7 @@ namespace App\Console\Commands; use Illuminate\Console\Command; use Illuminate\Filesystem\Filesystem; +use Illuminate\Support\Facades\Storage; class StorageTempClear extends Command { @@ -31,7 +32,7 @@ class StorageTempClear extends Command { $filesystem = app(Filesystem::class); - $path = storage_path('app/temp'); + $path = Storage::path('app/temp'); foreach ($filesystem->glob("{$path}/*") as $file) { $filesystem->delete($file); diff --git a/app/Jobs/Install/CopyFiles.php b/app/Jobs/Install/CopyFiles.php index 536262c2c..548702d0b 100644 --- a/app/Jobs/Install/CopyFiles.php +++ b/app/Jobs/Install/CopyFiles.php @@ -5,6 +5,7 @@ namespace App\Jobs\Install; use App\Abstracts\Job; use Illuminate\Support\Facades\File; use Illuminate\Support\Str; +use Illuminate\Support\Facades\Storage; class CopyFiles extends Job { @@ -35,7 +36,7 @@ class CopyFiles extends Job throw new \Exception(trans('modules.errors.file_copy', ['module' => $this->alias])); } - $source = storage_path('app/temp/' . $this->path); + $source = Storage::path('app/temp/' . $this->path); $destination = $this->getDestination($source); diff --git a/app/Jobs/Install/DownloadFile.php b/app/Jobs/Install/DownloadFile.php index d249329ad..b4029d25a 100644 --- a/app/Jobs/Install/DownloadFile.php +++ b/app/Jobs/Install/DownloadFile.php @@ -6,6 +6,7 @@ use App\Abstracts\Job; use App\Traits\SiteApi; use App\Utilities\Info; use Illuminate\Support\Facades\File; +use Illuminate\Support\Facades\Storage; class DownloadFile extends Job { @@ -47,7 +48,7 @@ class DownloadFile extends Job } $path = 'temp-' . md5(mt_rand()); - $temp_path = storage_path('app/temp/' . $path); + $temp_path = Storage::path('app/temp/' . $path); $file_path = $temp_path . '/upload.zip'; diff --git a/app/Jobs/Install/UnzipFile.php b/app/Jobs/Install/UnzipFile.php index 5ae79992f..a96cb0ff9 100644 --- a/app/Jobs/Install/UnzipFile.php +++ b/app/Jobs/Install/UnzipFile.php @@ -4,6 +4,7 @@ namespace App\Jobs\Install; use App\Abstracts\Job; use Illuminate\Support\Facades\File; +use Illuminate\Support\Facades\Storage; use ZipArchive; class UnzipFile extends Job @@ -35,7 +36,7 @@ class UnzipFile extends Job throw new \Exception(trans('modules.errors.unzip', ['module' => $this->alias])); } - $temp_path = storage_path('app/temp/' . $this->path); + $temp_path = Storage::path('app/temp/' . $this->path); $file = $temp_path . '/upload.zip'; diff --git a/app/Traits/Documents.php b/app/Traits/Documents.php index 9b7e35e1a..a555096c0 100644 --- a/app/Traits/Documents.php +++ b/app/Traits/Documents.php @@ -13,6 +13,7 @@ use Egulias\EmailValidator\Validation\MultipleValidationWithAnd; use Egulias\EmailValidator\Validation\RFCValidation; use Illuminate\Support\Collection; use Illuminate\Support\Str; +use Illuminate\Support\Facades\Storage; trait Documents { @@ -187,7 +188,7 @@ trait Documents $file_name = $this->getDocumentFileName($document); - $pdf_path = storage_path('app/temp/' . $file_name); + $pdf_path = Storage::path('app/temp/' . $file_name); // Save the PDF file into temp folder $pdf->save($pdf_path); diff --git a/app/Traits/Transactions.php b/app/Traits/Transactions.php index f40216532..85d754692 100644 --- a/app/Traits/Transactions.php +++ b/app/Traits/Transactions.php @@ -6,6 +6,7 @@ use App\Events\Banking\TransactionPrinting; use App\Models\Banking\Transaction; use App\Interfaces\Utility\TransactionNumber; use Illuminate\Support\Str; +use Illuminate\Support\Facades\Storage; trait Transactions { @@ -161,7 +162,7 @@ trait Transactions $file_name = $this->getTransactionFileName($transaction); - $pdf_path = storage_path('app/temp/' . $file_name); + $pdf_path = Storage::path('app/temp/' . $file_name); // Save the PDF file into temp folder $pdf->save($pdf_path);